switch:
- platform: gpio
pin: GPIO2
name: "room lamp"
id: lamp
binary_sensor:
- platform: gpio
pin: GPIO36
name: "room lamp Toggle Button"
on_press:
then:
- switch.toggle: lamp
- platform: gpio
pin: GPIO2
name: "room lamp"
id: lamp
binary_sensor:
- platform: gpio
pin: GPIO36
name: "room lamp Toggle Button"
on_press:
then:
- switch.toggle: lamp