Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix button_up/down_long not working in HASS 2022.4.3 #314

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions blueprints/controllers/ikea_e1743/ikea_e1743.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ variables:
button_down_release: ['2003']
zha:
button_up_short: ['on']
button_up_long: [move_with_on_off_0_83]
button_up_long: [move_with_on_off_0_83, move_with_on_off_MoveMode.Up_83]
button_up_release: [stop]
button_down_short: ['off']
button_down_long: [move_1_83]
button_down_long: [move_1_83, move_MoveMode.Down_83_bitmap8.0_bitmap8.0]
button_down_release: [stop]
zigbee2mqtt:
button_up_short: ['on']
Expand Down
10 changes: 5 additions & 5 deletions blueprints/controllers/ikea_e1744/ikea_e1744.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ variables:
click_double: ['1004']
click_triple: ['1005']
zha:
rotate_left: [move_1_195]
rotate_stop: [stop]
rotate_right: [move_0_195]
rotate_left: [move_1_195, move_MoveMode.Down_195_bitmap8.0_bitmap8.0]
rotate_stop: [stop, stop_bitmap8.0_bitmap8.0]
rotate_right: [move_0_195, move_MoveMode.Up_195_bitmap8.0_bitmap8.0]
click_short: [toggle]
click_double: [step_0_1_0]
click_triple: [step_1_1_0]
click_double: [step_0_1_0, step_StepMode.Up_1_0_bitmap8.0_bitmap8.0]
click_triple: [step_1_1_0, step_StepMode.Down_1_0_bitmap8.0_bitmap8.0]
zigbee2mqtt:
rotate_left: [brightness_move_down]
rotate_stop: [brightness_stop]
Expand Down
2 changes: 1 addition & 1 deletion blueprints/controllers/ikea_e1812/ikea_e1812.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ variables:
button_release: ['1003']
zha:
button_short: ['on']
button_long: [move_with_on_off_0_83]
button_up_long: [move_with_on_off_0_83, 'move_with_on_off_MoveMode.Up_83']
kanflo marked this conversation as resolved.
Show resolved Hide resolved
button_release: [stop]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add stop_with_on_off here.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Sab44,
are you sure about this? I thought it wasn't needed as for the feedback you originally provided in this comment.

Thank you!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @EPMatt
yes for my use case in my automations the button release action was not relevant, only the long press action. After the comment by @Azrael-Kun I rechecked the button release event and noticed it also needs to be changed. So for people relying on this value it should be adapted as well.

Cheers and thanks for all the work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
button_release: [stop]
button_release: [stop, stop_with_on_off]

@Sab44 I think this is what you are after correct?
@kanflo Noting that 2 of the blueprints also needed updates to the release/stop events are you able to confirm if the E1743 release/stop events have changed?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I meant.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Azrael-Kun : I will check if the release/stop events have changed for E1743. I actually do not use them which is why I have not noticed.

zigbee2mqtt:
button_short: ['on']
Expand Down
8 changes: 4 additions & 4 deletions blueprints/controllers/ikea_e2001_e2002/ikea_e2001_e2002.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,11 @@ variables:
button_right_long: [hold_3328_0]
button_right_release: [release_-27903]
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]
button_down_short: ['off']
button_down_long: [move_1_83]
button_down_release: [stop]
button_down_long: [move_1_83, move_MoveMode.Down_83_bitmap8.0_bitmap8.0]
button_down_release: [stop, stop_with_on_off]
zigbee2mqtt:
button_left_short: [arrow_left_click]
button_left_long: [arrow_left_hold]
Expand Down
2 changes: 1 addition & 1 deletion website/docs/controllers-hooks-ecosystem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This field requires that you have an existing text helper. Therefore, before set
:::caution
Make sure the text input is not altered by any other agents. The provided entity is used as a permanent storage area for the controller automation; any change to its state not carried out by the respective automation could lead to inconsistencies and unexpected behaviour.

Therefore, you should create **a separate text input for each Controller blueprint** you're configuring.
Therefore, you should create **a separate text input for each Controller blueprint** you're configuring. Additionally, **you need to set the maximum length of the input to 255** as the default length of 100 will lead to troubles.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed we're really wasting a lot of precious characters in the helper_last_controller_event input, and probably that's why increasing the max length of the input is required in this case.

I've opened #333 to keep track of this issue. I plan to submit a fix for this in the upcoming days, in a separate PR. Hopefully, then we won't need this note anymore. :)

I'll let you know as soon as the fix is in the main branch, so that you can rebase your PR and test blueprints without having to increase the max length of the text helper. 👍🏻

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to comment about this change in the helper from 100 to 255 max characters. I'm using this blueprint for the e1744 symfonisk rotary controller & while the updated blueprint linked to several posts above now recognizes turn right & turn left, it would not stop and go full max or full min. Only after I updated the helper max value to 255 did I see everything working again. Thanks so much for getting this working again, I really appreciate it!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback @ghgeiger!

:::

### Virtual Events
Expand Down