-
Notifications
You must be signed in to change notification settings - Fork 120
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
Global_setter for accessories #91
Comments
I see the problem. This can be handled in the setters for the bulb I guess (with a small wait before applying I suppose). How do you think it would be the most useful? How should the setter figure out that more than one char is about to be changed? |
I though that using the # aid=2 --> Light
# iid=9 --> State (on/off)
# iid=10 --> Brightness
{'characteristics': [{'aid': 2, 'iid': 9, 'value': 1}, {'aid': 2, 'iid': 10, 'value': 60}]} It should be fairly simple to call the hook method from that. Thought about passing a dictionary with the {char_1: value, char_2: value} where I should be able to have a PR for it this week. |
Any progress on that? Still having that annoying symptom on my end of lights hitting 100% before going to their set dim level when setting via Homekit |
Hi. I’m still interested in the outcome of this issue as I understand it triggers an annoying bug in Home Assistant causing lights to go to 100% before going to desired brightness. My eyes! Let me know if I can help test any patches. Thank you. |
This was done in #373 |
I think it might be useful to implement something like a
global_setter
for services. Those should get called when one or more char values of this service are about to be changed to provide an access point for end users.The concrete case is an issue / bug with the HomeKit lightbulb service. When setting the light to a specific brightness in the Home app from the off state, HomeKit calls to char
client_update_values
, one for the state (on / off) and one for the brightness char.Reacting to both with the currently used
setter_callbacks
could lead to flickering if say the light is first set to on (100%) and only then to the wanted brightness.Links:
Update
I've looked at the HAP doc, it might be better to implement it in the accessory class.
The text was updated successfully, but these errors were encountered: