I can’t seem to get an IR Receiver to activate the Home Assistant switch.toggle service from an ESP32DevKit board while it works fine from and ESP8266.
This is the code on the 8266 that works with no issues:
remote_receiver:
filter: 50us
pin:
number: GPIO0
inverted: true
dump:
- pioneer: {}
binary_sensor:
- platform: remote_receiver
name: "Office Plant Lights"
# Remote Button '1'
internal: true
on_release:
homeassistant.service:
service: switch.toggle
data:
entity_id: switch.office_plants
filters:
- delayed_off: 100ms
pioneer:
rc_code_1: 0x000C
And this is what doesn’t work on the ESP32
remote_receiver:
filter: 50us
pin:
number: GPIO36
inverted: true
dump:
- pioneer: {}
binary_sensor:
- platform: remote_receiver
name: "Office Plant Lights"
# Remote Button '7'
internal: true
on_release:
homeassistant.service:
service: switch.toggle
data:
entity_id: switch.office_plants
filters:
- delayed_off: 100ms
pioneer:
rc_code_1: 0x0042
This is using the same remote, just a different button to toggle the switch. The Logs show the “Office Plant Light” binary sensor is triggered, just seems the homeassistant.service isn’t getting triggered from the EPS32.
[15:48:38][D][binary_sensor:036]: 'Office Plant Lights': Sending state ON
[15:48:38][D][binary_sensor:036]: 'Office Plant Lights': Sending state OFF
What am I missing on the ESP32 to make this work?