From e050de0d4f87b81a116986e5d1cce49716fa1efc Mon Sep 17 00:00:00 2001 From: pszafer Date: Wed, 4 Dec 2024 09:40:56 +0100 Subject: [PATCH] add multiclick to rgbw --- boneio-dimmer_2rgbw-v0_3.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/boneio-dimmer_2rgbw-v0_3.yaml b/boneio-dimmer_2rgbw-v0_3.yaml index 25dcb26..1a79208 100644 --- a/boneio-dimmer_2rgbw-v0_3.yaml +++ b/boneio-dimmer_2rgbw-v0_3.yaml @@ -83,6 +83,26 @@ binary_sensor: mode: input: true inverted: true + on_multi_click: + - timing: # double click + - ON for at most 1s + - OFF for at most 0.5s + - ON for at most 1s + - OFF for at least 0.2s + then: + - light.toggle: rgbw_l + - logger.log: 'Double Click' + - timing: # single click + - ON for at most 1s + - OFF for at least 0.5s + then: + - light.toggle: rgbw_l + - logger.log: 'Single Click' + - timing: # long click + - ON for at least 1.4s + then: + - light.toggle: rgbw_r + - logger.log: 'Long Click' - platform: gpio name: 'IN_02' pin: @@ -138,6 +158,7 @@ binary_sensor: light: - platform: rgbw + id: rgbw_l name: 'RGBW L' red: chl01 green: chl02 @@ -146,6 +167,7 @@ light: default_transition_length: 2s gamma_correct: 0 - platform: rgbw + id: rgbw_r name: 'RGBW R' red: chr01 green: chr02