Hey folks,
I have an issue that is driving me nuts. I am trying to setup 3x gen 1 sonoff basics for some lamps and cannot get the button to also trigger the relay.
Here is the code I have:
binary_sensor:
#Button press
- platform: gpio
name: "${devicename} Button"
id: button_1
pin:
number: GPIO0
mode:
input: true
pullup: true
inverted: true
internal: true
on_press:
- light.toggle: light_1
#setup relay
output:
- platform: gpio
pin: GPIO12
id: relay_1
#make it look like a light switch/bulb
light:
- platform: binary
name: "${devicename} Light"
icon: "mdi:lightbulb"
id: light_1
output: relay_1
But its not working and I cant get my head round why. Any suggestions?
Thanks
J