esphome/tests/components/cc1101/test.esp8266.yaml
2024-02-29 22:34:59 +01:00

62 lines
1.2 KiB
YAML

spi:
clk_pin: D5
miso_pin: D6
mosi_pin: D7
cc1101:
id: transceiver
cs_pin: D8 # GPIO15
gdo0:
number: D1 # GPIO5
allow_other_uses: true
bandwidth: 200
frequency: 433920
rssi:
name: RSSI
lqi:
name: LQI
remote_transmitter:
- pin:
number: D1 # GDO0
allow_other_uses: true
carrier_duty_percent: 100%
remote_receiver:
pin:
number: D1 # GDO0
allow_other_uses: true
dump:
- rc_switch
# Settings to optimize recognition of RF devices
tolerance: 50%
buffer_size: 2kb
filter: 250us
idle: 4ms
on_rc_switch:
- logger.log:
format: "on_rc_switch: %i %llu"
args: [x.protocol, x.code]
binary_sensor:
- platform: remote_receiver
name: "Window"
rc_switch_raw:
code: '110111110001111011100110'
filters:
- delayed_off: 1000ms
button:
- platform: template
name: "Gate"
on_press:
- remote_transmitter.transmit_cc1101:
code: '0111000110010011110110010100011111110001001011110111'
protocol:
pulse_length: 434
sync: [1, 6]
zero: [1, 2]
one: [2, 1]
inverted: true
repeat:
times: 10