core: ghost / unexpected hue dimmer events
The problem
Since 2023.8.x I’m getting unexpected hue dimmer events (i.e. events that trigger when the dimmers were not activated since several hours). This happens very seldomly, such as 2-3 times a week. I have automations that respond to dimmer events, that’s why I notice some very strange behaviors (in addition to having lights turn on unexpectedly). When the issue happens, I get many ghost dimmer events in a short timeframe.
What version of Home Assistant Core has the issue?
2023.8.4
What was the last working version of Home Assistant Core?
2023.7.x (not 100% sure though)
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Philips Hue
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Yesterday the issue happened, and I can see the following errors in the logs:
2023-08-26 14:48:12.138 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohue/v2/controllers/sensors.py", line 57, in _handle_event
await super()._handle_event(evt_type, evt_data)
File "/usr/local/lib/python3.11/site-packages/aiohue/v2/controllers/base.py", line 257, in _handle_event
callback(evt_type, cur_item)
File "/usr/src/homeassistant/homeassistant/components/hue/event.py", line 101, in _handle_event
self._trigger_event(resource.button.last_event.value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'last_event'
2023-08-26 14:54:35.074 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohue/v2/controllers/sensors.py", line 57, in _handle_event
await super()._handle_event(evt_type, evt_data)
File "/usr/local/lib/python3.11/site-packages/aiohue/v2/controllers/base.py", line 257, in _handle_event
callback(evt_type, cur_item)
File "/usr/src/homeassistant/homeassistant/components/hue/event.py", line 101, in _handle_event
self._trigger_event(resource.button.last_event.value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'last_event'
2023-08-26 14:54:35.075 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohue/v2/controllers/sensors.py", line 57, in _handle_event
await super()._handle_event(evt_type, evt_data)
File "/usr/local/lib/python3.11/site-packages/aiohue/v2/controllers/base.py", line 257, in _handle_event
callback(evt_type, cur_item)
File "/usr/src/homeassistant/homeassistant/components/hue/event.py", line 101, in _handle_event
self._trigger_event(resource.button.last_event.value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'last_event'
2023-08-26 14:54:35.076 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohue/v2/controllers/sensors.py", line 57, in _handle_event
await super()._handle_event(evt_type, evt_data)
File "/usr/local/lib/python3.11/site-packages/aiohue/v2/controllers/base.py", line 257, in _handle_event
callback(evt_type, cur_item)
File "/usr/src/homeassistant/homeassistant/components/hue/event.py", line 101, in _handle_event
self._trigger_event(resource.button.last_event.value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'last_event'
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 28 (10 by maintainers)
Exactly, I will add that soon. Requires a bit less of refactoring but that should fix it for good. So a little bit more patience please
I’ll have a look at this again tomorrow, I have been very busy with other stuff so this one got a bit forgotten. I’ll chew a bit on it if I’m going to implement some custom logic for button events in the aiohue lib or just compare the last button state in HA.
Still. its crap that the hue bridge sends an attribute changed event (while no attributes changed!) after/when its updating the firmware
Is it fixed? 😃 THX btw! Can we enable auto updates again?
I also have the same issue as described here with “ghost” hue button presses triggering around 3am BST (hue hub is set to update 2am - GMT I guess).
I have 6 Hue switches (“Hue dimmer switch (RWL022)”) with one of the buttons toggling AC in each room. So we now have the AC turning on seemingly randomly overnight. When I looked at logs in the past there was not much to report.
This happened again last night coinciding with the Hue hub update @rbp1987 mentioned.
The triggers don’t happen straight away
Similar log event as flagged in the issue by @spasche
Logs around room A/B trigger
Logs around room C trigger
Logs around room D trigger
There wasn’t any logs around room E or F trigger oddly… so hard to know if theses errors in the logs are a distraction or not.