core: Philips Hue lights states still not correctly updating on 2021.12.3
The problem
I am still having incorrect Hue light states after updating to 2021.12.3 last night.
I added the a sample of the error found in the logs. It happened 24 times since updating 12 hours ago. Kind regards.
What version of Home Assistant Core has the issue?
core-2021.12.3
What was the last working version of Home Assistant Core?
core-2021.11
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Philips Hue
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hue
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2021-12-18 10:14:27 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohue/v2/controllers/base.py", line 183, in _handle_event
callback(type, cur_item)
File "/usr/src/homeassistant/homeassistant/components/hue/v2/hue_event.py", line 47, in handle_button_event
CONF_TYPE: hue_resource.button.last_event.value,
AttributeError: 'NoneType' object has no attribute 'last_event'
Additional information
My Hue bridge is in a separate VLAN.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 19 (5 by maintainers)
I can confirm the issue on 2021.12.3. It has definitely not gone away.
We’ve just released an update for the aiohue library with some fixes. I was not able to reproduce the slow state changes (and my bridge has like 45 lights on it or so) but there were a couple of unhandled edge cases, especially on reconnect and multiple requests to the bridge. That is now handled much better.
Please do note that toggling grouped lights can cause a small slowdown in state update as the state derives from the underlying lights in HA.
Anyways, please test with the upcoming HA 2021.12.4 bugfix release. If you’re still experiencing issues, please open a new issue report with a detailed description of the behavior you see (issue report per issue please to keep my mind sane). Thanks!!
I actually have the issue that only some lights persist being reported in the wrong state. E.g. All lights are off, I switch the room on (or use a hue scene), all physical lights turn on as expected. All lights are reported as “on” in home assistant, but some switch back to being reported as “off” 2-3 seconds later. Hue app shows the correct states. Could this be the same issue as discussed here or something else? Im using home assistant OS, latest stable version.
/edit: it seems I imagined that the error persistent after updating to 12.3. At least today I did not experience this behavior. It seems the error I describe was really only in 12.2. Sorry for the confusion. However it at least seems to react slower compared to e.g. core 2021.11.x… Will investigate more.
Thanks for your report, still some leftover issue in there as it appears. Seems this is the connection guard which kicks in after 2 hours of not receiving any state from the bridge. Due to to the single way nature of the eventstream we have no way to detect if the connection failed on us so there’s a check in there that if there was no event within 2 hours we assume the connection is dead and restart it.
I’ll see if I can make it more robust and fix the error you see when it’s reloading.