-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Fix Nanoleaf light state propagation after change from home asisstant #144291
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
base: dev
Are you sure you want to change the base?
Fix Nanoleaf light state propagation after change from home asisstant #144291
Conversation
Hey there @milanmeu, @joostlek, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
…ix/nanoleaf-state-propagation
…/home-assistant-core into bugfix/nanoleaf-state-propagation
Would it make sense to ask the coordinator to refresh the data instead? |
I am not familiar with home-assistant core logic, is there a drawing (uml) on how it should work? (I copy pasted this from an external integration wich is working pretty well, govee). Do you have a reference? would be great if I can implement it the home assistant way. |
well you can run |
hmm okay, so this is called in the light? will give it a try, thanks for the hint |
I have updated the code, local tests are working well. Light state is reflected after toggle/change via home assistant |
Proposed change
As discussed in #97599 the propagation of the state change is not happening as expected within the nanoleaf integration. the update happens after a regular poll from the coordinator (instead of instant). By calling the integrated
self.async_write_ha_state()
the on/off toggle is propagated back to home assistant state store.It still not solve the back propagation from the nanoleaf app, this will be done in another PR.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: