-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
base: main
Are you sure you want to change the base?
Conversation
Hey @kanflo, thank you so much for your contribution! 🚀 🔄 We're currently running a few checks to make sure that everything is great with your contribution. Results are coming soon, stay tuned! |
Oh, and I added a note on the input text length in the docs. |
Hey, thank you for this fix! Could you fix E1812 as well? It shows the same behavior. Possibly other devices are affected, these are just the ones that I know of. |
@Sab44 If you have changed the text input max length and install the Studio Code Server add-on install, please try to change this line:
to
I am a bit reluctant to raise a PR for a controller I do not own and cannot test ;) Edit: I would expect the |
Hey @kanflo, ✅ Your contribution passed all the checks, awesome! Thanks again for dedicating your precious time to this project. 🔥 📝 Updated blueprints included in this PR can be tested by importing them in Home Assistant via the following links. |
I can confirm that this change fixes the issue also for the E1812. What I'm wondering is why ZHA changed these values in the first place. Especially comparing them to the values from deconz and zigbee2mqtt defined in the yaml, the ZHA values seem overly complex. Additionally requiring the user to increase the length of the helpers is not ideal. No idea though if something can be done about it in ZHA. |
ZHA depends on ZigPy where |
Using the +++ w/blueprints/automation/EPMatt/ikea_e2001_e2002.yaml
@@ -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_MoveMode.Up_83]
+ button_up_release: [stop_with_on_off]
button_down_short: ['off']
- button_down_long: [move_1_83]
- button_down_release: [stop]
+ button_down_long: [move_MoveMode.Down_83_bitmap8.0_bitmap8.0]
+ button_down_release: [stop_with_on_off]
zigbee2mqtt:
button_left_short: [arrow_left_click]
button_left_long: [arrow_left_hold] |
Same Problem for the rotation of E1744 nothing is working anymore |
@paulbrunn : if you could please try the same change with your E1744 I can add your change and @Azrael-Kun's to the PR. |
FYI, for reference also see this related ZHA issue discussion for Home Assistant core -> home-assistant/core#69375 |
Hi @kanflo, sorry for my late response. Thank you so much for opening a PR here! 🚀 Thank you for your precious time, and thank you to you all guys for providing feedback on this! |
@kanflo @EPMatt Here is what I did to get e1744 working as I had the same issues as @paulbrunn. This also relies on changing the max input text length as described above. +++ b/blueprints/controllers/ikea_e1744/ikea_e1744.yaml
@@ -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_MoveMode.Down_195_bitmap8.0_bitmap8.0]
+ rotate_stop: [stop_bitmap8.0_bitmap8.0]
+ rotate_right: [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_StepMode.Up_1_0_bitmap8.0_bitmap8.0]
+ click_triple: [step_StepMode.Down_1_0_bitmap8.0_bitmap8.0] @kanflo if you want to add this to your PR that would be appreciated, or I can submit a separate one |
Hey @kanflo, thank you so much for your contribution! 🚀 🔄 We're currently running a few checks to make sure that everything is great with your contribution. Results are coming soon, stay tuned! |
@pcarton : Done! Sorry about the delay. |
Hey @kanflo, ✅ Your contribution passed all the checks, awesome! Thanks again for dedicating your precious time to this project. 🔥 📝 Updated blueprints included in this PR can be tested by importing them in Home Assistant via the following links. https://github.com/kanflo/awesome-ha-blueprints/blob/ikea_e1742_dimmer_fix/blueprints/controllers/ikea_e1743/ikea_e1743.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kanflo,
first of all thank you for your truly precious contribution and for your patience. I'm terribly sorry for my delay but I'm currently really busy and can't dedicate lot of time to the project. I truly appreciate the help you're providing here. :)
Here I suggested a few changes, providing backward compatibility for users still at Home Assistant 2022.4.* or below.
I'm aware that the project lacks a clear developer guide on how to contribute to blueprints docs, so I'll take care of it after we're done with all the code changes. :)
Edit: Could you please also add the new actions for the E1812 (#314 (comment) @Sab44) and the E2001/E2002 (#314 (comment) @Azrael-Kun) to the respective controller blueprints? We've received positive feedback in both cases, so I believe it's safe to add those mappings as well (but always keeping the old ones for backward compatibility).
Thank you again for your precious time!
@@ -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. |
There was a problem hiding this comment.
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. 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great!
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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!
Hey @kanflo, thank you so much for your contribution! 🚀 🔄 We're currently running a few checks to make sure that everything is great with your contribution. Results are coming soon, stay tuned! |
@EPMatt: I added your your proposed changes and those from @Azrael-Kun and @Sab44 (could you please verify I added the correct changes). |
Hi @kanflo, thank you for your work. And @EPMatt for your original work as well of course :) I have added a fix for the E1810 remote as well, tested it locally and can confirm it works. I was not sure how to publish this so I made a PR from my fork to yours: kanflo#1 I hope it's the correct way of going for it, otherwise feel free to advise how I can do this (for example if you prefer me to make a second, direct PR to this repository instead). Have a great weekend! |
Co-authored-by: Matteo Agnoletto <[email protected]>
Fix E1810 as well
Found this PR tonight after finally having time to try and figure out why dimmer controller E1743 stopped working a while ago. Imported the blueprint directly from link above and confirmed it now works again as expected. For anyone else that comes across this problem, simply import the most recent link above that matches your device and replace your controller with that instead. |
I too found this when I was about to go mad when my Symfonisk remote wouldn't control volume on my Sonos system. It will with this update, however I found that it does so perpetually by spamming this event and won't stop:
Possibly unrelated to other changes...? I don't know, but it's equally useless behavior for a volume control. 😅 |
@EPMatt I saw your change request but it was marked as "outdated" so I hit "request review". Not sure if it is me or Github that is on the wrong side of things. |
Found this thread today while checking how I could submit fixes for controller Ikea e2001/e2002 after fighting a few days to correct the Button Up/Down Hold, Button Up/Down Release and Button Left/Right Release. For some reason none of the fixes above for the controller are on the blueprint I downloaded from the community form unfortunately. Did I miss something regarding the controller Ikea e2001/e2002 blueprint? There is still one fix that needs to be done regarding the Left/Right Release that I didn't see fixed or maybe I missed. The "random" number (positive for left, negative for right) that is after release_ ZHA event prevents the release from working correctly and I included a validation for the ZHA integration where the condition is evaluated on my code:
And the change for:
Feel free to add this fix to the blueprint repository if you find it useful and confirm that solves the problem without issues. For me is working, before when I changed the color of a Ikea RGB lamp by holding the left or rigt button using the Light Hook, the color change never stopped after I release the button. With this fix works as expected. |
Can you confirm if the perpetual behavior I'm seeing is new to this PR? |
I noted that I get the following event both for long press up release and long press down release on my E1743:
Maybe this is why your Symfonisk remote does not stop spamming @spacecakes. |
I'd like to kindly ask for your feedback about our work here. If you have time, please answer the poll in the above discussion. This will help shaping the future of Awesome HA Blueprints. 🚀 Thank you! |
Hi folks! I read the entire discussion, which had many developments during the last few months. The PR is focused on fixing blueprints for IKEA controllers integrated with ZHA, starting from HASS 2022.4.3.
I hope to have included everything correctly, please let me know if something's missing. Thank you so much for all your work here. I'm glad to see that so many people got involved in this PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems ok to me here!
@kanflo the fix I suggested in the review has already been included in a commit, so we're good here.
Now we can take a look at the remaining tasks mentioned in my last comment (#314 (comment)). After those are fixed we should be done with this PR. :)
Thank you for your precious contribution!
Hi @spacecakes thank you for reporting here. I guess you're using this blueprint in conjunction with the Media Player Hook. Thanks! |
Hi @kanflo, do these events get fired continuously, or only after a button is released? |
I can confirm that the release events have changed their event args and that these args change every time the event is fired. Applying the above changes now correctly fires the ahb_controller_event release event. |
@EPMatt They get fired on button press and button release, no events are fired while the button is being pressed. |
Can confirm E1812 is working fine for weeks now with these changes, also Thanks for moving this forward. |
I am testing this branch for my ikea e2001_e2002 styrbar remote. I now can dim a bit until I still recieve these messages:
Should I provide more details ? Is this a known issue ? |
@varac That's the issue of the text helper being limited to 100 characters by default. To fix this, increase the "Maximum length" of the helper to 255 characters. |
@nonninz Thanks for your help, but I can't see any length in my text helper. I created it under Settings -> Devices & Services -> Helpers -> Create Helper -> Text, using latest HA core 2022.8.7 |
@EPMatt Is there anything missing here? Will this get merged? |
Would be nice to get this one sorted ay :) |
@EPMatt Will you be merging this one? :) |
I noted that long press down was failing again on 2023.6.3 and required the following change to
If anyone needs to debug this in the future, check the helpers and make sure the stuff above matches the |
Breaking change
After updating to HASS 2022.4.3 it seems the ZHA events for long press up/down has changed leading to possible errors in the input texts and, above all, the up/down long press event not being recognized by the Ikea E1743 automation. Bleeding edge HASS users will appreciate this change as the Ikea dimmers spring back to life. Others will feel the same frustration as the aforementioned did after the upgrade.
Proposed change
Ideally, the template would accept both the old ZHA events as well as the new ones or (even better) the least common denominator.
Checklist
npm run format
before submitting my Pull Request.