Kane610 / deconz

Python library wrapping deconz rest api for home-assistant
MIT License
46 stars 17 forks source link

Add more effects for Philips Hue lights #654

Closed hanskroner closed 1 month ago

hanskroner commented 2 months ago

Recent firmware updates for Philips Hue lights have added additional lighting effects. This PR updates the library's list to include them.

Additionally, this PR fetches the effects a light reports as supported from the capabilities key that was recently added to deCONZ's REST API. This enables a follow up PR to the Home Assistant integration that would add these effects to the light entities.

hanskroner commented 1 month ago

@Kane610 just in case you hadn't seen the PR. Any chance you could have a look at this?

hanskroner commented 1 month ago

@Kane610 - Tests have been updated and the branch rebased on top of the last dependency bumps.

hanskroner commented 1 month ago

I hope I understood correctly. A missing capabilities key is now covered by the tests:

---------- coverage: platform linux, python 3.12.6-final-0 -----------
Name                                                              Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------------------
/workspaces/deconz/pydeconz/models/light/light.py                   183      0   100%

EDIT: Also added tests for capabilities being present, but missing color within it as well as an additional check for color being present, but missing effects within it.

hanskroner commented 1 month ago

@Kane610 - I appreciate the guidance and the patience, thank you!

Kane610 commented 1 month ago

I can do a release tonight of pydeconz

Kane610 commented 1 month ago

I've released v117