-
Notifications
You must be signed in to change notification settings - Fork 727
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
Add Philips RDM004 (HUE Wall Switch rev 004) to quirks #3237
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #3237 +/- ##
==========================================
+ Coverage 88.18% 88.22% +0.03%
==========================================
Files 301 303 +2
Lines 9412 9484 +72
==========================================
+ Hits 8300 8367 +67
- Misses 1112 1117 +5 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
zhaquirks/philips/rdm004.py
Outdated
attributes.update( | ||
{ | ||
0x0031: ("philips", t.bitmap16, True), | ||
0x0034: ("mode", t.enum8, True), |
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.
Some spaces is after the comma that the tests dont like.
Put in 0x0034: ("mode", t.enum8, True),
and it shall working OK
Looks nice but one new error is detected:
I dont knowing if its only tinging the command or its needs more work then im not one code warier. |
removed typing.List depency
Give me a second :D will fix this! |
fixed List to list
All green !!!! |
I see this is also failing on the RDM001 (and will possibly also fail on the other quirks in the Philips folder. |
dont know if this works, just for test
just a test
This I am unable to get the tests to work... |
tests/test_philips.py
Outdated
|
||
assert_signature_matches_quirk( | ||
zhaquirks.philips.rdm001.PhilipsRDM001, signature | ||
) |
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.
Its one space after the ) that making the test complaining.
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.
The other:
+++ b/tests/test_philips.py
@@ -1,11 +1,7 @@
"""Tests for Philips RDM001 and RDM004 quirks."""
-import pytest
-from tests.common import ClusterListener
import zhaquirks
-from zhaquirks.philips.rdm001 import PhilipsRDM001
-from zhaquirks.philips.rdm004 import PhilipsRDM004
zhaquirks.setup()
Its looks the test i not liking importing this function but i dont knowing if its needed for the code or not then im not one code warier.
I think Puddly or TheJullian is knowing it bettter.
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.
nope, the space after the ) was not the problem apparently
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.
The first error is now gone only the import section and the the strange last ones . . . so one step forewords and . . .
for more information, see https://pre-commit.ci
This should be implemented with the following PRs:
Everything should be available in Home Assistant Core 2024.12. Some of it is already available in 2024.11. |
Proposed change
Added the RDM004 to the quirks.
Credits to Regenbui (Wesley Westerveld): https://community.home-assistant.io/t/how-to-configure-the-philips-hue-wall-module-to-use-push-button-momentary-type-wall-switches-zha/451125/27
Additional information
The RDM004 was not usable in ZHA, the fix as proposed by "Regenbui" was working as expected!
Also fixed a minor
Checklist
pre-commit
checks pass / the code has been formatted using Black