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

Add necessary support for Adaptive Lightning #428

Merged
merged 2 commits into from
Dec 4, 2022
Merged

Add necessary support for Adaptive Lightning #428

merged 2 commits into from
Dec 4, 2022

Conversation

vitkabele
Copy link
Contributor

Add necessary characteristics to enable implementation of Adaptive Lightning. Also provide a demo light bulb implementation to demonstrate the basic usage of the newly added characteristics.

This PR closes #284

The HomeKit requires three characteristics to be advertised by the light
source in order to be recognized as having support for adaptive lightning.

Create definitions for these characteristics and add them as optional
for the lightbulb service.

Signed-off-by: Vít Kabele <vit@kabele.me>
Add implementation of a dummy lightbulb advertising Color Temperature,
Brightness and three required characteristics for Adaptive Lightning.

This virtual lightbulb can be added as an accessory with Adaptive
Lightning support.

Signed-off-by: Vít Kabele <vit@kabele.me>
@codecov
Copy link

codecov bot commented Dec 4, 2022

Codecov Report

Merging #428 (f38e6a9) into dev (9a54ecf) will decrease coverage by 0.09%.
The diff coverage is 88.46%.

@@            Coverage Diff             @@
##              dev     #428      +/-   ##
==========================================
- Coverage   91.72%   91.63%   -0.10%     
==========================================
  Files          20       20              
  Lines        2128     2140      +12     
  Branches      262      264       +2     
==========================================
+ Hits         1952     1961       +9     
- Misses        134      136       +2     
- Partials       42       43       +1     
Impacted Files Coverage Δ
pyhap/accessory_driver.py 91.66% <25.00%> (-0.68%) ⬇️
pyhap/accessory.py 96.68% <100.00%> (+0.04%) ⬆️
pyhap/camera.py 77.21% <100.00%> (ø)
pyhap/characteristic.py 100.00% <100.00%> (ø)
pyhap/iid_manager.py 100.00% <100.00%> (ø)
pyhap/service.py 100.00% <100.00%> (ø)
pyhap/util.py 100.00% <100.00%> (ø)

@ikalchev ikalchev merged commit bc3be4f into ikalchev:dev Dec 4, 2022
@niorko
Copy link

niorko commented Jan 6, 2023

When it will be integrated into HA? :) I am looking forward to it. Thanks for the work.

@vitkabele
Copy link
Contributor Author

When it will be integrated into HA? :) I am looking forward to it. Thanks for the work.

Not sure about that. I'm currently trying to figure out how exactly the integration should look. Please see related discussion at HA forum. I'll be happy for any suggestion.

@Harshdeep2611
Copy link

So I have tried to add this characteristics in the custome component and then expose to apple home but adaptive light feature is not there in my light controller in apple home

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.

Adaptive lighting support
4 participants