From b9b31368be5ae3ec67f62df972347f85768129e6 Mon Sep 17 00:00:00 2001 From: Aiden <37043404+tarontop@users.noreply.github.com> Date: Mon, 28 Aug 2023 17:03:05 +0800 Subject: [PATCH] add led Add led state to be controlled by switch or button --- athom-mini-switch.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/athom-mini-switch.yaml b/athom-mini-switch.yaml index 6f49ae2f..381af63b 100644 --- a/athom-mini-switch.yaml +++ b/athom-mini-switch.yaml @@ -49,6 +49,7 @@ output: light: - platform: status_led + id: led name: "${friendly_name} Blue LED" disabled_by_default: true pin: @@ -81,7 +82,7 @@ binary_sensor: mode: INPUT_PULLUP on_state: - light.toggle: mini_relay - + - light.toggle: led on_multi_click: - timing: - ON for at most 0.5s @@ -109,6 +110,7 @@ binary_sensor: - OFF for at least 0.2s then: - light.toggle: mini_relay + - light.toggle: led - timing: - ON for at least 4s then: