I am trying to get my Raspberry Pi to recognize my push button switch. My relays are working fine but the buttons do not. They do show up in love lace as a binary sensor.
Here is my wiring for the switch:
# RPi Relays
switch:
- platform: rpi_gpio
invert_logic: true
ports:
4: Bell
#Rpi Buttons
binary_sensor:
- platform: rpi_gpio
invert_logic: true
ports:
22: Push button
I’m sure I must be missing something simple
Edit:
Ok we changed the code a bit, but now we just get a on for one second then it goes to off when pushing or releasing the button. I want it to register as “on” until the button is released.
Code:
binary_sensor:
- platform: rpi_gpio
sensors:
- port: 22
name: "Tornado Alarm"
invert_logic: true