From 0fb796c724468a30bc394b0fab12baec9dcd6200 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Sat, 20 Jan 2024 13:15:56 +0100 Subject: [PATCH] Toggle LED strip on button press (Closes: #70) (#75) --- yeelight_light_strip6.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/yeelight_light_strip6.yaml b/yeelight_light_strip6.yaml index c9c2bcd..a8115e9 100644 --- a/yeelight_light_strip6.yaml +++ b/yeelight_light_strip6.yaml @@ -24,6 +24,14 @@ logger: api: +binary_sensor: + - platform: gpio + pin: + number: GPIO19 + name: "${name} button" + on_press: + - light.toggle: light0 + output: - platform: ledc pin: GPIO13 @@ -37,6 +45,7 @@ output: light: - platform: rgb + id: light0 name: "${name} rgb" red: output_red green: output_green