TypeError: object of type 'NoneType' has no len()
The problem
2023-02-19 23:40:01.441 ERROR (MainThread) [homeassistant.components.climate] Error while setting up lyric platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 301, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 442, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 595, in _async_add_entity
device = device_registry.async_get_or_create(
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 365, in async_get_or_create
connections = _normalize_connections(connections)
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 916, in _normalize_connections
return {
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 917, in <setcomp>
(key, format_mac(value)) if key == CONNECTION_NETWORK_MAC else (key, value)
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 176, in format_mac
if len(to_test) == 17 and to_test.count(":") == 5:
TypeError: object of type 'NoneType' has no len()
What version of Home Assistant Core has the issue?
2023.2.5
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
lyric
Link to integration documentation on our website
https://www.home-assistant.io/integrations/lyric/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
Couldn't reopen #52528 but it seems to be the same issue and still isn't resolved. I too have only leak sensors, no thermostats.
Hey there @timmo001, mind taking a look at this issue as it has been labeled with an integration (lyric) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of lyric can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleChange the title of the issue.@home-assistant reopenReopen the issue.@home-assistant unassign lyricRemoves the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
lyric documentation lyric source (message by IssueLinks)
It seems that the leak sensors don't have macID in the response. I tried plumbing through a change to deviceID for everything as that seems to be universal for lyric devices, however that had other issues because the aiolyric library device lookup depends on macIDs. This integration doesn't work at all for me atm. Happy to help debug, I'm a capable dev, just not familiar with HA yet.
@balloob sorry for the @. This issue has been brought up twice (also in #52528) without a response from the code owner @timmo001. I'm a developer and happy to work with someone on the issue, but I'm not sure where to go at this point.
I'm a developer and happy to work with someone on the issue, but I'm not sure where to go at this point.
You can find our developer documentation here:
https://developers.home-assistant.io
If you have additional questions during development, please feel free to join the #devs channels in our Discord server.
../Frenck
Ran into this issue today when attempting to add a couple of L1 WiFi Water Leak and Freeze Detectors to Home Assistant.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.