Not the first topic about issue with Yeelights, but the existing topics do not cover exactly my situation or are quite old.
I am using two Xiaomi Yeelight YLDP06YL E27 bulbs which are regularly temporarily marked as unavailable in HA.
Errors in de log:
Unable to update device 192.168.178.20, Erker: A socket error occurred when sending the command.
Unable to update device 192.168.178.20, Erker: Bulb closed the connection.
Latest firmware (2.0.6_0065)
LAN mode enabled
Bulbs are controllable with the Yeelight app while HA marked it as unavailable, so it does not seems to be a WiFi issue
Bulbs do have an uptime > 20 days according to my UniFi controller:
Anyone here with the same Yeelight bulb type without this issue?
Yes mine seem to be unavailable for a minute or so at a time constantly throughout the day. Currently none of mine are available and have been like this for days. I wonder if the unavailable thing is some built in protection thing, like a denounce or something to stop too many changes in a certain time period. And if it does it locks any more requests for a minute. You can simulate this by changing the light colour, on, off, etc quite quickly.
I wonder if home assistant is pinging them too much for their liking so they keep blocking the ping and showing unavailable?