Hue lights accessible from hassio but not showing up in HA

Hue lights were working my HA (v.0.78.0) setups with no issues for long time but yesterday I noticed they are gone from UI and not showing in “Services” list.

I have following configuration.yaml:

    - host:
      allow_hue_groups: false
      allow_unreachable: true

and json with all necessary data is retuned from Hue bridge when I ssh in to hassio terminal and do curl<username>/lights. That is why I assume the problem is in HA itself or configuration.

Only related entries I can find in logs is

2018-09-22 12:13:31 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at
2018-09-22 12:13:31 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at Retrying in 32 seconds

but I think I have seen these entries in logs even some time ago when Hue lights were fully functional in HA.

Any ideas?

After extensive digging I finally found out root cause.
It appears that HA entity_registry.yaml is not used anymore and hue devices were reinitialized in .storage/core.entity_registry file with entity_id values created from friendly names in Hue that may have changed over time for many HA users.

So be aware that since HA 0.77 there is breaking change

The entity registry yaml file has been removed. It is now stored inside .storage and should only be managed via the UI (@balloob - #16018)

This may not be so obvious because entity_registry.yaml file is actually still there and .storage directory is hidden and at least in my case custom default view is set up in HA.

I think (hope) this is the cause of the issue I ran into yesterday, when updating to 78.3.

Bridge seemed perfectly fine otherwise, but no lights at all in the Services list.

So I have to delete the “entity_registry.yaml” file after updating?

Thanks for sharing

No clear solution yet - still trying to debug.
Tried to delete “old” /config/entity_registry.yaml and “new” files
and reboot hassio to recreate files in .storage directory.

after reconnecting to Hue bridge via Setting -> Integration and updating entity_id to those discovered automatically I had my hue lights back. But now I have issues with emulated wemo switches :frowning:

One is clear - this breaking change should not be mentioned in read and bold. And migration to new approach should be handled better.

I ended up with following:

  1. Reconfigured Hue Bridge:
  • Remove bridge integration in Settings;
  • Delete files:
  • /config/entity_registry.yaml
  • /config/.storage/core.config_entries
  • /config/.storage/core.device_registry
  • /config/.storage/core.entity_registry
  • After Hassio reboot configure Hue Bridge once more;
  1. Reconfigured wemo switches to MQTT switches in HA since wemo discovery did not work reliably even before. After getting Hue devices appear again I could not make wemo devices to be discovered by HA.
  • Updated configuration.yaml to (because Tasmotized Sonoffs switches are still emulating wemo for Alexa):
    - belkin_wemo
  • Configured all Tasmotized Sonoffs switches a la
  - platform: mqtt
    name: "Hallway light"
    state_topic: "stat/sonoff6/POWER1"
    command_topic: "cmnd/sonoff6/POWER1"
    availability_topic: "tele/sonoff6/LWT"
    qos: 1
    payload_on: "ON"  
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: false

N.B. I have Tasmota Command SetOption26 set to ON so don’t just copy paste. You may have just /POWER instead of /POWER1.

Hope it helps someone.

I removed the bridge and added it again immediately afterwards, which did the trick for me, so my lights are back. Didn’t even need a restart.

The entity_registry.yaml file was removed automatically. I didn’t touch the hidden files in .storage that you’ve mentioned but it wasn’t necessary to delete those I guess.

Thanks again for sharing.