From 48a54b16ee9b7f9461b6fb40048bb82f9a93998b Mon Sep 17 00:00:00 2001 From: Ivar van den Braken Date: Sat, 16 Nov 2024 23:01:55 +0100 Subject: [PATCH 1/4] Fixed a bug preventing long pressing actions to be triggered. Ikea e2002 button up / button down / left hold / right hold are now working properly --- .../ikea_e2001_e2002/ikea_e2001_e2002.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml b/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml index d62bf96a..c74d0fc9 100644 --- a/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml +++ b/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml @@ -310,16 +310,16 @@ variables: zha: button_left_short: [press_257_13_0] button_left_long: [hold_3329_0] - button_left_release: [release_1365] + button_left_release: [release] # second parameter is number of ms button is held button_right_short: [press_256_13_0] button_right_long: [hold_3328_0] - button_right_release: [release_-27903] + button_right_release: [release] # second parameter is number of ms button is held button_up_short: ['on'] - button_up_long: [move_with_on_off_0_83] - button_up_release: [stop] + button_up_long: [move_with_on_off_0_83,move_with_on_off_MoveMode.Up_83] + button_up_release: [stop, stop_with_on_off] # Kept first parameter for potential backwards compatibility of previous firmware versions button_down_short: ['off'] - button_down_long: [move_1_83] - button_down_release: [stop] + button_down_long: [move_1_83, move_MoveMode.Down_83_0_0] + button_down_release: [stop, stop_with_on_off] # Kept first parameter for potential backwards compatibility of previous firmware versions zigbee2mqtt: button_left_short: [arrow_left_click] button_left_long: [arrow_left_hold] @@ -482,7 +482,7 @@ action: # if looping is not enabled run the custom action only once default: !input action_button_left_long - conditions: - - '{{ trigger_action | string in button_left_release }}' + - '{{ trigger_action.split("_")[0] in button_left_release }}' # for integrations which need to store the last controller event, need to check the previous button event, stored in the provided input_text - '{{ not integration_id in integrations_with_prev_event_storage or last_controller_event | string in button_left_long }}' sequence: @@ -565,7 +565,7 @@ action: # if looping is not enabled run the custom action only once default: !input action_button_right_long - conditions: - - '{{ trigger_action | string in button_right_release }}' + - '{{ trigger_action.split("_")[0]in button_right_release }}' # for integrations which need to store the last controller event, need to check the previous button event, stored in the provided input_text - '{{ not integration_id in integrations_with_prev_event_storage or last_controller_event | string in button_right_long }}' sequence: From 49fbbfe653af3342185c4cf87c51c358852dff73 Mon Sep 17 00:00:00 2001 From: EPMatt <30753195+EPMatt@users.noreply.github.com> Date: Thu, 2 Jan 2025 22:48:25 +0100 Subject: [PATCH 2/4] docs: add clarification comment --- blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml b/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml index c74d0fc9..4fd69076 100644 --- a/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml +++ b/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml @@ -482,6 +482,7 @@ action: # if looping is not enabled run the custom action only once default: !input action_button_left_long - conditions: + # target all release events without considering the event suffix - '{{ trigger_action.split("_")[0] in button_left_release }}' # for integrations which need to store the last controller event, need to check the previous button event, stored in the provided input_text - '{{ not integration_id in integrations_with_prev_event_storage or last_controller_event | string in button_left_long }}' @@ -565,6 +566,7 @@ action: # if looping is not enabled run the custom action only once default: !input action_button_right_long - conditions: + # target all release events without considering the event suffix - '{{ trigger_action.split("_")[0]in button_right_release }}' # for integrations which need to store the last controller event, need to check the previous button event, stored in the provided input_text - '{{ not integration_id in integrations_with_prev_event_storage or last_controller_event | string in button_right_long }}' From 8324dcaf0a289c9f2458e4aca44ecf7068fef208 Mon Sep 17 00:00:00 2001 From: EPMatt <30753195+EPMatt@users.noreply.github.com> Date: Thu, 2 Jan 2025 22:49:39 +0100 Subject: [PATCH 3/4] bump version to 2025.01.02 --- blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml b/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml index 4fd69076..9f653357 100644 --- a/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml +++ b/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml @@ -15,7 +15,7 @@ blueprint: 🚀 This blueprint is part of the **[Awesome HA Blueprints](https://epmatt.github.io/awesome-ha-blueprints) project**. - ℹ️ Version 2022.08.08 + ℹ️ Version 2025.01.02 source_url: https://github.com/EPMatt/awesome-ha-blueprints/blob/main/blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml domain: automation input: From 75b6c745d014647af5912b5fd5c9d055ea63be2b Mon Sep 17 00:00:00 2001 From: EPMatt <30753195+EPMatt@users.noreply.github.com> Date: Thu, 2 Jan 2025 23:04:59 +0100 Subject: [PATCH 4/4] docs: update changelog --- website/docs/blueprints/controllers/ikea_e2001_e2002.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/blueprints/controllers/ikea_e2001_e2002.mdx b/website/docs/blueprints/controllers/ikea_e2001_e2002.mdx index 1f24863d..83239c86 100644 --- a/website/docs/blueprints/controllers/ikea_e2001_e2002.mdx +++ b/website/docs/blueprints/controllers/ikea_e2001_e2002.mdx @@ -290,3 +290,4 @@ If you notice your controller is not behaving as expected please reset the devic - **2021-11-07**: first blueprint version :tada: - **2022-08-08**: Optimize characters usage for the `helper_last_controller_event` text input. +- **2025-01-02**: (ZHA) Fixed a bug preventing long pressing actions to be triggered. ([@Ivarvdb](https://github.com/Ivarvdb))