Philips Hue integration stopped working all of a sudden after core update today

Hue stooped working after I updated Core today morning. Log details below, can someon point me to what is wrong?

Logger: homeassistant.config_entries
Source: helpers/device_registry.py:131
First occurred: 7:12:22 AM (1 occurrences)
Last logged: 7:12:22 AM

Error setting up entry Philips hue for hue
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/hue/__init__.py", line 24, in async_setup_entry
    if not await bridge.async_initialize_bridge():
  File "/usr/src/homeassistant/homeassistant/components/hue/bridge.py", line 104, in async_initialize_bridge
    await async_setup_devices(self)
  File "/usr/src/homeassistant/homeassistant/components/hue/v2/device.py", line 76, in async_setup_devices
    known_devices = [add_device(hue_device) for hue_device in dev_controller]
  File "/usr/src/homeassistant/homeassistant/components/hue/v2/device.py", line 76, in <listcomp>
    known_devices = [add_device(hue_device) for hue_device in dev_controller]
  File "/usr/src/homeassistant/homeassistant/components/hue/v2/device.py", line 57, in add_device
    return dev_reg.async_get_or_create(config_entry_id=entry.entry_id, **params)
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 325, in async_get_or_create
    connections = _normalize_connections(connections)
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 873, in _normalize_connections
    return {
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 874, in <setcomp>
    (key, format_mac(value)) if key == CONNECTION_NETWORK_MAC else (key, value)
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 131, in format_mac
    if len(to_test) == 17 and to_test.count(":") == 5:
TypeError: object of type 'NoneType' has no len()

Bump - anyone else with this problem?

Which version are you using now?

FWIW, I’m using 2021.11.3 and the Hue integration is working well (no errors like the one you posted).

I am on Core Version: core-2021.12.0b0

You’re running a beta version. It might have been worth mentioning that in the first post and might explain why no one replied to your question (until now) because no one has experienced the problem with the release version.

The beta version contains a revised version of the Hue integration based on a new API. You should report the problem in the Core repository on GitHub.

Okay - just did that and reported. Any links available to documentation/discussion of the revised Hue integration with the new API?

Also I tried restoring to a backup, but my SmartThings integration broke when I did that, Hue is now working. Anyways of fixing this without having to reinstall SmartThings from scratch.

Logger: homeassistant.config_entries
Source: components/smartthings/__init__.py:121
First occurred: 10:44:50 PM (1 occurrences)
Last logged: 10:44:50 PM

Error setting up entry Home for smartthings
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 121, in async_setup_entry
    token = await api.generate_tokens(
  File "/usr/local/lib/python3.9/site-packages/pysmartthings/smartthings.py", line 209, in generate_tokens
    result = await self._service.generate_tokens(
  File "/usr/local/lib/python3.9/site-packages/pysmartthings/api.py", line 424, in generate_tokens
    raise APIInvalidGrant(data.get("error_description"))
pysmartthings.errors.APIInvalidGrant: Invalid refresh token: 3873b21kb2872ybwsvws252

All I know about it is limited to what I read in the PR that implemented it:

1 Like

Thank You.

I’m having significant issues with this change - when I turn off a light the light goes out, but the toggle flips back to “on” repeatedly. Lights become unavailable that don’t appear as unavailable in the hue app.
Some behaviors might just be things I need to get used to but these two are extremely frustrating and feel like my home is now “broken”

Ensure you have upgraded to 2021.12.3 which is supposed to correct the majority of reported problems with the new Hue integration.

If you are using the .3 patch release and still have problems, report them as an Issue in the Core repo on GitHub. The integration’s author has been very helpful and responsive.

I have upgraded. it is a bit better, but still fiddly
I’ll report some issues I’m still seeing
thanks!