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

Provide effects on supported Philips Hue lights #355

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

BetaRavener
Copy link

Description

Adds additional effects to supported Philips Hue lights. To control the effects, commands are sent to a exposed cluster.
Implements HA / UI portion of zigpy/zha-device-handlers#2517, which contains detailed discussion.

The effect is turned on by command 0x22 that accepts brightness and the effect ID.
To turn off, command 0x20 is used that will preserve most recent color and brightness while stopping further effect execution.

Testing

Tested with Philips Hue Go. See video below:
https://github.com/user-attachments/assets/9d6236f6-4d8f-40ee-8525-82e674d4ca85

Prerequisite

PR implementing quirk for the Philips cluster: zigpy/zha-device-handlers#2517

@BetaRavener
Copy link
Author

Test asserts are failing, but seem to be correct - tests will need to be changed. All lights that provide cluster 0xFC03 are failing, while those missing it (e.g. signify-netherlands-b-v-rwl022.json) are not.

@TheJulianJES
Copy link
Contributor

You can delete the JSON test files for now then. We'll eventually regenerate and upload them again.
In the future, we might have a tool to re-generate these tests automatically (without needing to grab them from a running instance).

@BetaRavener BetaRavener force-pushed the feature/philips-effects branch from e5b8630 to 00a3125 Compare February 12, 2025 14:36
@BetaRavener
Copy link
Author

@TheJulianJES I pushed changes to match the last renaming from quirk PR.

I haven't resolved the failing tests yet as I lost track which JSONs were problematic, but I realized I also don't know why they were failing in the first place. Given that I had old cluster name, even if the quirk PR got already picked up during tests, my class shouldn't have matched any device yet.

I've added CLUSTER_HANDLER_PHILIPS_HUE_LIGHT to aux_cluster_handlers to give HueEffectLight just small extra weight over HueLight class thinking that strict_match would require the new cluster to be present. But looking at strict_matched, is it true the aux clusters are not considered for matching? Should I then move the CLUSTER_HANDLER_PHILIPS_HUE_LIGHT to cluster_handler_names instead?

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.

2 participants