binary_sensor:
- platform: gpio
pin:
number: GPIO16
mode: INPUT
inverted: True
name: "${device_name}_1"
on_multi_click:
- timing:
- ON for at most 0.5s
- OFF for at least 0.2s
then:
- switch.toggle: load1
- timing:
- ON for at most 0.5s
- OFF for at most 0.5s
- ON for at most 0.5s
- OFF for at least 0.2s
then:
- homeassistant.service:
service: switch.toggle
data:
entity_id: switch.sonoff_s20b #魚缸燈
- timing:
- ON for 1s to 3s
- OFF for at least 0.2s
then:
- homeassistant.service:
service: switch.toggle
data:
entity_id: switch.sonoff_basic134 #魚缸過濾
binary_sensor.gpio: [source /config/esphome/esp01s.yaml:30]
platform: gpio
pin:
number: GPIO2
mode: INPUT
inverted: True
name: ${device_name}_1
on_multi_click: [source /config/esphome/esp01s.yaml:38]
- [source /config/esphome/esp01s.yaml:38]
timing:
- ON for at most 0.5s
- OFF for at least 0.2s
then: [source /config/esphome/esp01s.yaml:42]
- [source /config/esphome/esp01s.yaml:42]
Unable to find action with the name 'switch.toggle'.
switch.toggle: load1 [source /config/esphome/esp01s.yaml:42]