Closed ruffson closed 1 month ago
Hey there @dmulcahey, @adminiuga, @puddly, @thejulianjes, mind taking a look at this issue as it has been labeled with an integration (zha
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
zha documentation zha source (message by IssueLinks)
The device is likely reading from the Time
cluster. I recently fixed a bug with it where the local time zone was not used but it's possible the value isn't read very often.
Can you enable ZHA debug logging and try to re-join the device? You don't need to remove it from ZHA, just allow joins and factory reset it. When you disable debug logging hopefully the log will show what the device is trying to read.
The device is likely reading from the
Time
cluster. I recently fixed a bug with it where the local time zone was not used but it's possible the value isn't read very often.
Hey @puddly thanks a lot for the fast response!
I assumed that re-joining the device is done with the reconfigure
button in HA but that did not seem to do much even though it was successful so I went ahead and deleted and re-added it after all. Here is the log:
I believe this is a device bug:
2024-09-14 12:09:29.790 DEBUG (MainThread) [zigpy.zcl] [0x5481:1:0x000a] Decoded ZCL frame: Time:Read_Attributes(attribute_ids=[0])
2024-09-14 12:09:29.791 DEBUG (MainThread) [zigpy.zcl] [0x5481:1:0x000a] Sending reply: Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0, status=<Status.SUCCESS: 0>, value=TypeValue(type=UTCTime, value=779656169))])
The device reads the time
attribute of the coordinator's Time
cluster, which is the UTC time. It does not read the time_zone
or local_time
attributes. This should be fixed in https://github.com/zigpy/zha-device-handlers/ and the quirk should lie to the device and send the local_time
when the device tries to read time
.
Oh okay, thanks @puddly I will bring this up over there in the other repo then. Really appreciate your help narrowing this down!
The problem
I am using a Zigbee-enabled pet feeder from Aquara for feeding my pet. I am also retrieving the amount of portions fed.
After I dispense food via the HA action or pressing the button on the device, the feeder must send back to Zigbee that food was dispensed, because it keeps track of the portions e.g. by tracking how many were dispensed "today".
The issue is that the entity
sensor.cat_feeder_portions_dispensed_today
resets at the new day in UTC time and not the time of the configured home assistant or local server time. You can see that in the screenshot below, the dispensed portions goes to 0 at 17:00 local time.Now, I know this may not be a bug in Zigbee itself but I have a hard time understanding where to find and solve the issue. The pet feeder most likely will not have a clock and if it does, it would be synchronized with Zigbee itself. So something resets this counter at the wrong time. If this is a generic Zigbee entity (and not any specific Aquara integration), then the hard-coded timezone issue must be somewhere in the configuration of the integration or my Zigbee dongle?
If anyone can point me into the right direction, that would be amazing. The data is all there but it is just resetting at the wrong time.
I am using the SONOFF Zigbee 3.0 dongle.
What version of Home Assistant Core has the issue?
core-2024.9.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Zigbee
Link to integration documentation on our website
https://www.home-assistant.io/integrations/zha
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
My
docker-compose.yml
is quite simple:I can verify that
localtime
is accurate withzdump
: