platform: gpio pin: number: GPIO4 inverted: true id: gosund_button on_multi_click: - timing: - ON for at most 1s - OFF for at most .4s - ON for at most 1s - OFF for at least 0.1s then: - script.execute: double_tap - timing: - ON for at most 1s - OFF for at least 0.4s then: - if: condition: light.is_off: gosund_light then: - light.turn_on: id: gosund_light brightness: !lambda |- return (id(day_night) ? ${day_level} : ${night_level}) / 100.0; else: - light.turn_off: gosund_light - script.execute: single_tap