Skip to content
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

Warning on home assistant Core for ZHA integration #134585

Closed
toto25550 opened this issue Jan 3, 2025 · 22 comments · Fixed by #135008
Closed

Warning on home assistant Core for ZHA integration #134585

toto25550 opened this issue Jan 3, 2025 · 22 comments · Fixed by #135008

Comments

@toto25550
Copy link

The problem

Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 00:12:4b:00:2f:8a:b5:ea), with device info: {'connections': {('zigbee', '00:12:4b:00:2f:b2:a5:fa')}, 'identifiers': {('zha', '00:12:4b:00:2f:b2:a5:fa')}, 'manufacturer': 'eWeLink', 'model': 'DS01', 'name': 'eWeLink DS01', 'via_device': ('zha', 00:12:4b:00:2f:8a:b5:ea)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0,

What version of Home Assistant Core has the issue?

Core-2025.1.0

What was the last working version of Home Assistant Core?

Core-2025.1.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Zigbee

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha

Diagnostics information

Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 00:12:4b:00:2f:8a:b5:ea), with device info: {'connections': {('zigbee', '00:12:4b:00:2f:b2:a5:fa')}, 'identifiers': {('zha', '00:12:4b:00:2f:b2:a5:fa')}, 'manufacturer': 'eWeLink', 'model': 'DS01', 'name': 'eWeLink DS01', 'via_device': ('zha', 00:12:4b:00:2f:8a:b5:ea)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0,

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jan 3, 2025

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!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zha Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


zha documentation
zha source
(message by IssueLinks)

@micium
Copy link

micium commented Jan 3, 2025

same warning here:
Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 00:12:4b:00:24:c9:b1:16), with device info: {'connections': {('zigbee', '00:12:4b:00:25:03:5a:c4')}, 'identifiers': {('zha', '00:12:4b:00:25:03:5a:c4')}, 'manufacturer': 'eWeLink', 'model': 'MS01', 'name': 'eWeLink MS01', 'via_device': ('zha', 00:12:4b:00:24:c9:b1:16)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

@Thorn-hill
Copy link

same here
note: according to name of the device its philips hue lighstrip.

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:324
First occurred: 10:48:25 PM (1 occurrences)
Last logged: 10:48:25 PM

Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 44:e2:f8:ff:fe:8c:78:61), with device info: {'connections': {('zigbee', '00:17:88:01:09:b8:fa:cb')}, 'identifiers': {('zha', '00:17:88:01:09:b8:fa:cb')}, 'manufacturer': 'Signify Netherlands B.V.', 'model': 'LCL001', 'name': 'Signify Netherlands B.V. LCL001', 'via_device': ('zha', 44:e2:f8:ff:fe:8c:78:61)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

@pinkfloydFR
Copy link

Seem i have the same problem, my zigbee switch does not work anymore, in node red, the action properties is missing since update :

image

@puddly
Copy link
Contributor

puddly commented Jan 4, 2025

@toto25550 In the ZHA visualization tab, can you search for 00:12:4b:00:2f:8a:b5:ea? What device does it refer to?

@esand
Copy link

esand commented Jan 4, 2025

@puddly Not the person you're asking, but I received the same error as well. I looked up the device in my error and it's just a leak detector. I checked my topology and I'm noticing that all but 3 devices are missing connections but are reporting correctly. I introduced a mains powered device earlier and then disconnected its power, so I'm not sure if that's causing the missing connection lines or not, but it does seem bizarre (it's been several hours since I removed the mains powered device).

@puddly
Copy link
Contributor

puddly commented Jan 4, 2025

@esand Thanks! In the message, there are actually multiple IEEE addresses listed:

Detected that integration 'zha' calls `device_registry.async_get_or_create` referencing a non existing `via_device` 
('zha', 00:12:4b:00:2f:8a:b5:ea), with device info: {'connections': {('zigbee', '00:12:4b:00:2f:b2:a5:fa')}, 
        ^^^^^^^^^^^^^^^^^^^^^^^                                                  ^^^^^^^^^^^^^^^^^^^^^^^
'identifiers': {('zha', '00:12:4b:00:2f:b2:a5:fa')}, 'manufacturer': 'eWeLink', 'model': 'DS01', 
'name': 'eWeLink DS01', 'via_device': ('zha', 00:12:4b:00:2f:8a:b5:ea)} at homeassistant/components/zha/helpers.py, 
line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 
2025.12.0.

The first one is the device itself. The second one is the "via_device" the warning is complaining about. I'm unable to reproduce this locally so I'm trying to figure out what exactly the pattern here is.

Is the second device something you see in your visualization? Or only the first?

@esand
Copy link

esand commented Jan 4, 2025

The first one is the device itself. The second one is the "via_device" the warning is complaining about. I'm unable to reproduce this locally so I'm trying to figure out what exactly the pattern here is.

Sorry - for me, the via device is my main controller (I have only one, no routers at the moment - all my devices are battery powered). The second device in my error was one of my water leak sensors.

Is the second device something you see in your visualization? Or only the first?

When I check my ZHA visualization, I see all my devices (incl the unplugged new one I adopted), but only 3 of them have connection lines going to my controller. Before in 2024.12.5, they would all have a connection to my controller - but I confirmed that the devices without connection lines still appear to be working and HA can see their current info.

@toto25550
Copy link
Author

Hello
The information beliow (hub zigbee SONOFF ZigBee 3.0 USB Dongle Plus, TI CC2652P Coordinator, Universelle USB ZigBee Hub)

Informations Appareil
CC2652
par Texas Instruments
Micrologiciel : Z-Stack 20210708
Zigbee info
IEEE: 00:12:4b:00:2f:8a:b5:ea
Nwk: 0x0000
Device Type: Coordinator
Dernière vue: 2025-01-04T06:04:51
Source d'énergie: Mains

@lj-tms
Copy link

lj-tms commented Jan 4, 2025

I also had this warning.

2025-01-04 10:37:14.066 WARNING (MainThread) [homeassistant.helpers.frame] Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 00:12:4b:00:2e:1e:6f:87), with device info: {'connections': {('zigbee', '00:17:88:01:0d:f6:42:35')}, 'identifiers': {('zha', '00:17:88:01:0d:f6:42:35')}, 'manufacturer': 'Signify Netherlands B.V.', 'model': 'SML003', 'name': 'Signify Netherlands B.V. SML003', 'via_device': ('zha', 00:12:4b:00:2e:1e:6f:87)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

The device in my warning is a Philips Hue motion detector. It and all my other devices appear to be working correctly. I'm not missing any connections in my visualization.

@parihaaraka
Copy link

same here (SONOFF ZigBee 3.0 USB Dongle Plus)

Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 00:12:4b:00:2b:48:24:dc), with device info: {'connections': {('zigbee', '00:12:4b:00:2b:48:24:dc')}, 'identifiers': {('zha', '00:12:4b:00:2b:48:24:dc')}, 'manufacturer': 'Texas Instruments', 'model': 'CC2652', 'name': 'Texas Instruments CC2652', 'via_device': ('zha', 00:12:4b:00:2b:48:24:dc)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False).

@drumbelabu
Copy link

drumbelabu commented Jan 4, 2025

same here (Sonoff CC2652P with Zstack 20240710 firmware)

Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 00:12:4b:00:2b:5f:55:99), with device info: {'connections': {('zigbee', '00:17:88:01:0b:cf:38:cf')}, 'identifiers': {('zha', '00:17:88:01:0b:cf:38:cf')}, 'manufacturer': 'Signify Netherlands B.V.', 'model': 'SML003', 'name': 'Signify Netherlands B.V. SML003', 'via_device': ('zha', 00:12:4b:00:2b:5f:55:99)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

@micium
Copy link

micium commented Jan 4, 2025 via email

@ColinRobbins
Copy link
Contributor

ColinRobbins commented Jan 5, 2025

Seeing the same with a SONOFF device...

Detected that integration 'zha' calls `device_registry.async_get_or_create` referencing a non existing `via_device` ('zha', 
00:21:2e:ff:ff:07:b8:ee), with device info: {'connections': {('zigbee', '00:12:4b:00:25:8b:c5:62')}, 'identifiers': {('zha', 
'00:12:4b:00:25:8b:c5:62')}, 'manufacturer': 'SONOFF', 'model': '01MINIZB', 'name': 'SONOFF 01MINIZB', 'via_device': ('zha', 
00:21:2e:ff:ff:07:b8:ee)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, 
update_before_add=False). This will stop working in Home Assistant 2025.12.0, please create a bug report at 
https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

In my case, I have 3 "01MINIZB" devices, and all seem to be working as expected. The one refenced is:

IEEE: 00:12:4b:00:25:8b:c5:62
Nwk: 0xd714
Device Type: Router
LQI: 255
RSSI: -61
Last seen: 2025-01-05T15:05:39
Power source: Mains

The address 00:21:2e:ff:ff:07:b8:ee refers to my conbeeII router.

@tradmangh
Copy link

tradmangh commented Jan 5, 2025

Same problem here since 2024-12-25 00:00.
Using an SMLIGHT SLZB-06M (Firmware: core: v2.5.8 / zigbee: 20231030) connected via Ethernet cable as a zigbee coordinator.
All Zigbee devices are shown as unavailable.

@lmcancu1
Copy link

lmcancu1 commented Jan 5, 2025

Same warning for me. However, my zigbee devices (all buttons) are still working except one (TS0041
by _TZ3000_vn88ezar) is now reporting a battery of 5%. It was at 100% earlier.
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:324
First occurred: 5:30:39 PM (1 occurrences)
Last logged: 5:30:39 PM

Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', e4:06:bf:ff:fe:21:58:77), with device info: {'connections': {('zigbee', '7c:c6:b6:ff:fe:38:4f:96')}, 'identifiers': {('zha', '7c:c6:b6:ff:fe:38:4f:96')}, 'manufacturer': 'eWeLink', 'model': 'SNZB-01P', 'name': 'eWeLink SNZB-01P', 'via_device': ('zha', e4:06:bf:ff:fe:21:58:77)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

Logger: zha.zigbee.cluster_handlers
Source: components/zha/init.py:151
First occurred: 5:30:39 PM (2 occurrences)
Last logged: 5:30:39 PM

[0xCD22:2:0x0300]: [Min mireds is 0, setting to 153] Please open an issue on the quirks repo to have this device corrected

Logger: bellows.types.named
Source: components/zha/init.py:151
First occurred: 5:30:38 PM (4 occurrences)
Last logged: 5:30:38 PM

Unknown status <EmberStatus.LIBRARY_NOT_PRESENT: 181>, converting to generic <sl_Status.FAIL: 1>

@C0MTRAYA
Copy link

C0MTRAYA commented Jan 6, 2025

here's my turn to say I have the same problem! however apart from the message in the logs, that doesn't seems to affect anything else, everything is up and running and I still can add new ZigBee devices (in fact I would not have noticed the error message if I didn't had to go check the log to troubleshoot an old custom integration that is outdated and not related to this issue at all). Here's the message I have:

Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 84:b4:db:ff:fe:fc:fc:f5), with device info: {'connections': {('zigbee', '28:6d:97:00:01:05:53:a9')}, 'identifiers': {('zha', '28:6d:97:00:01:05:53:a9')}, 'manufacturer': 'Samjin', 'model': 'multi', 'name': 'Samjin multi', 'via_device': ('zha', 84:b4:db:ff:fe:fc:fc:f5)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False). This will stop working in Home Assistant 2025.12.0, please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+zha%22

Hope it get fixed before that make problems haha! issues are always fixed pretty quickly I don't worry too much

@puddly
Copy link
Contributor

puddly commented Jan 6, 2025

Just to be clear, this is just a deprecation warning about code, it has no side effects whatsoever and isn't itself a problem!

@Knarf0607
Copy link

Same with sonoff:
WARNING (MainThread) [homeassistant.helpers.frame] Detected that integration 'zha' calls device_registry.async_get_or_create referencing a non existing via_device ('zha', 00:12:4b:00:2f:8a:02:1b), with device info: {'connections': {('zigbee', 'd4:48:67:ff:fe:32:48:c2')}, 'identifiers': {('zha', 'd4:48:67:ff:fe:32:48:c2')}, 'manufacturer': 'SONOFF', 'model': 'ZBMINIR2', 'name': 'SONOFF xxxx, 'via_device': ('zha', 00:12:4b:00:2f:8a:02:1b)} at homeassistant/components/zha/helpers.py, line 1177: _async_add_entities(entities_to_add, update_before_add=False).

@esand
Copy link

esand commented Jan 7, 2025

@puddly In case this helps at all... the error still shows up on 2025.1.1 which bumped ZHA to 0.45 which also bumped zigpy and quirks to their latest releases too (but I'm sure you know all this 😄). I also noticed that the IEEE mentioned in the via_device isn't quoted as a string - not sure if that's just an issue with the error printing or not.
Also, in ZHA 0.44, there were some changes done relating to state class, and I'm wondering if that might be triggering this warning?

@puddly
Copy link
Contributor

puddly commented Jan 7, 2025

@esand Good call on the missing quotes, that was indeed the issue! The EUI64 object for via_device was being passed directly instead of being converted into a string.

@esand
Copy link

esand commented Jan 7, 2025

@esand Good call on the missing quotes, that was indeed the issue! The EUI64 object for via_device was being passed directly instead of being converted into a string.

Glad I mentioned it - I was going to say something the other day, but while looking at the code, I noticed a number of other places that seemed to pass the IEEE as an object, not putting it through str() first and so I thought it was OK. Knowing this was indeed the issue, may want to check for other areas that deal with the same object and make sure they're casting it when necessary as well? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.