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

(ZHA) Fixed a bug preventing long pressing actions to be triggered. #620

Merged
merged 4 commits into from
Jan 2, 2025

Conversation

Ivarvdb
Copy link
Contributor

@Ivarvdb Ivarvdb commented Nov 16, 2024

Ikea e2002 button up / button down / left hold / right hold are now working properly

Thank you for taking the time to work on a Pull Request. Your contribution is really appreciated! 🎉
Please don't delete any part of the template, since keeping the provided structure will help maintainers to review your work more rapidly.

Sections marked as * are required and need to be filled in.

Proposed change*

resolves #619.

Checklist*

  • I followed sections of the Contribution Guidelines relevant to changes I'm proposing.
  • I properly tested proposed changes on my system and confirm that they are working as expected.
  • I formatted files with Prettier using the command npm run format before submitting my Pull Request.

Ikea e2002 button up / button down / left hold / right hold are now working properly
Copy link
Contributor

github-actions bot commented Nov 16, 2024

Hey @EPMatt, thank you so much for your contribution! 🚀

🔄 We're currently running a few checks to make sure that everything is great with your contribution.
If further actions need to be performed before your contribution can be reviewed, additional guidance will be provided to you in the next comment.

Results are coming soon, stay tuned!

@azachar
Copy link

azachar commented Dec 23, 2024

I used the fork of @Ivarvdb, and finally my brightness up/down is working as expected, thank you for your bugfix!

@EPMatt EPMatt changed the title Fixed a bug preventing long pressing actions to be triggered. (ZHA) Fixed a bug preventing long pressing actions to be triggered. Jan 2, 2025
Copy link
Owner

@EPMatt EPMatt left a comment

Choose a reason for hiding this comment

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

Thank you so much for your contribution @Ivarvdb! And thanks @azachar for testing. 🚀

I'm publishing your fix to the main branch.

@EPMatt
Copy link
Owner

EPMatt commented Jan 2, 2025

Also, thanks everyone for your kind patience - life happens, and unfortunately I couldn't contribute at all to this project for a long time. Luckily, I'm hopefully now slowly getting back to be more active here.

Thank you all for your continuous support - can't believe we are getting close to 900 stars!

@EPMatt EPMatt merged commit 2066c43 into EPMatt:main Jan 2, 2025
1 check passed
@danleongjy
Copy link

danleongjy commented Jan 4, 2025

I was also looking into why double-press actions for Styrbars don't trigger correctly when I came across this pull request. Not sure whether this is a real issue or not (I may be misunderstanding the logic in the code), but why is the logic for checking for double presses using the condition trigger_action | string in states(helper_last_controller_event)? Earlier lines save the old state of the helper to variable last_controller_event, then update helper to the new trigger_action. So by the time it gets to the check for double press, the condition will check if the trigger_action equals itself?

Should the conditions instead be trigger_action | string == last_controller_event?

@EPMatt
Copy link
Owner

EPMatt commented Jan 5, 2025

Hey @danleongjy,

thank you for spotting that. It's been a while since I inspected my old code, but I have to admit that looks suspicious to me as well. Is the double press functionality restored with the latest version of the IKEA E2001/E2002 controller blueprint?

@danleongjy
Copy link

danleongjy commented Jan 6, 2025

Nope the behaviour has not been resolved with the latest version of the E2001/2002 blueprint. I'll write up a new issue with my findings. Thanks Matt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - ZHA ikea e2002 long hold buttons presses not triggering correctly
4 participants