Skip to content

Commit

Permalink
Fixed a bug preventing long pressing actions to be triggered.
Browse files Browse the repository at this point in the history
Ikea e2002 button up / button down / left hold / right hold are now working properly
  • Loading branch information
Ivarvdb committed Nov 16, 2024
1 parent 9ee5920 commit 48a54b1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 48a54b1

Please sign in to comment.