after having experienced this for almost 2 years now, had to conclude there’s no way to really solve it (from HA side), and we need to find a way to ‘deal’ with it.
Things I found that make Hue work as robust as can be:
try to make the instance as lean as possible, too much goings on frequently kick Hue out of connection. Notorious culprits in my settings are Rest sensors, and integrations/components that require (heavy) traffic at startup (eg Buienradar)
Every now and then adding an extra component immediately makes Hue suffer. I’ve come to see Hue more as a messenger of internal struggle than being a culprit itself.
Never has the Hue Custom component caused issues, nor have CC’s done so perse. The warning message we get using CC’s was added after a firm discussion about this… Not saying CC’s can’t interfere, I have eg always had issues with the custom cards updater (now deprecated), or the sensor authorized. Having a lot of template sensors can cause startup slowdown, which just might (can’t prove it) frustrate Hue initialization…
I have a 2nd ‘clean’ HA install, on which I test all new versions and other stuff. delete these after testing. Only keep Hue, Tradfri, Google cast on those (can’t switch off the endless discovery of those), and Darksky sensor, to create some sensors. It is rock solid. Hue never even blinks.
So, long story short, and what ever the cause may be, Hue signals internal traffic (would not say issues just yet…) and makes you need to review your setup carefully.
Yes, now and then I need 3 restarts for the lights to show up (after not having been initialized at startup at all), or they take 2 to 3 minutes to finally kick in. It’s a bummer.
And, unless a major revamp of the integration will be made possible if and when Hue dev’s finally decide to auto send changes instead of needing to be polled by HA, I fear we can do nothing else than ‘deal’ with it.
Will update soon to a Pi4 and hope the better specs relieve the HA instance of these sorrows…
update
just as a fyi: found another culprit for huge hue connection issues: the Airquality integration Opensensemap.
After having enabled that, constant errors in the logs about not being able to retrieve data for that component, while suffering the notorious Hue errors at the same time. Lag in the system, and lights showing unavailable. Taking it out again relieves the system at once, and lights are back in the frontend…