it can work locally, without wifi connection.
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
it can work locally, without wifi connection.
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