I’ve been happily using OMG on a couple of ESP8266-12, but I wanted the API simplicity and the ability to do OTA updates of ESPhome so decided to switch over, I have RF door contacts sensors that worked great with OMG but I cannot figure out how to do it in ESPhome, these sensors send one code on opening and one on closing, I can receive the RF codes in the dashboard logs it’s just the YAML formatting I need help with.
thanks all
binary_sensor:
- platform: gpio
pin: 13
name: "Lounge PIR Sensor"
device_class: motion
- platform: remote_receiver
name: "Doorbell"
rc_switch_raw:
code: '011101111111100101000011'
- platform: remote_receiver
name: "Back Door (RF-On)"
device_class: opening
internal: false
on_press:
then:
- binary_sensor.template.publish:
id: switchbackdoor
state: OFF
rc_switch_raw:
code: '110100000100010000001110'
protocol: 1
- platform: remote_receiver
name: "Back Door (RF-Off)"
internal: false
on_press:
then:
- binary_sensor.template.publish:
id: switchbackdoor
state: ON
rc_switch_raw:
code: '110100000100010000001010'
protocol: 1
- platform: template
name: "Back Door"
device_class: door
id: switchbackdoor
this is what I ended up with