adaptive-lighting icon indicating copy to clipboard operation
adaptive-lighting copied to clipboard

Locally controlled lights not updating state

Open drinfernoo opened this issue 4 years ago • 4 comments

So this addon has been working great for me, for quite a while...

But seems to have issues with lights I've integrated "locally". I first noticed it with a few bulbs using LocalTuya, but chalked it up to that integration being quite new, and simply went back to using them via a cloud-based integration (Tuya Custom).

Now, more recently, I've seen similar behavior with two of my MQTT lights, which are Sengled bulbs paired to a ZZH hub, using zigbee2mqtt.

The issue is that, regardless of control style (voice via Google Home and Home Assistant Cloud, the Lovelace UI on browser or mobile, or via a bound Zigbee remote), turning on/off the light doesn't always update the frontend state... The light turns off, for example, but the icon in Lovelace doesn't, and attempting to turn it "off" again in the UI usually makes it turn back on, and adapt it's state 🤔

The other side of the coin is a bit more frustrating, as turning a light "on" never tells the UI that it's happened, leaving the light unable to be turned off via the UI, as it is already "off".

I can furnish any logs or other information needed, but I'm not sure what would be most helpful in diagnosing this. For reference, all of the bulbs I have had this issue with are setup with both "take control" and "detect non-HA changes".

drinfernoo avatar Feb 03 '21 14:02 drinfernoo

This sounds a little like it's more of a HA issue than an adaptive_lighting issue. I had similar issues when using Tuya bulbs on their own API and even sometimes with LocalTuya, since it seems like the bulbs take some time to report back to HA. With Tuya's stock API, it can take upwards of 3-4 minutes even.

Those issues all resolved after flashing to ESPHome and/or Tasmota.

Can't say that I can comment on the Zigbee bulbs, but that sounds like an HA integration issue too.

regoras avatar Feb 03 '21 17:02 regoras

Yeah... as I mentioned, I had initially thought that the issue with my Tuya bulbs was due to their integration (LocalTuya), so I refrained from opening this issue when I noticed it then. I switched them back to the Tuya Custom integration (in order to force a few of my bulbs to support color in the UI), which is a cloud-based one, and haven't had any issues at all with those bulbs updating their state.

Similarly, my two Sengled bulbs (which had been implemented via ZHA until this week, when I switched to zigbee2mqtt) had also been working fine, but are now having issues as well. For example, the light in my daughter's bedroom was turned off around 9pm last night, and still hadn't updated it's state when I got up for work at 6am.

drinfernoo avatar Feb 03 '21 18:02 drinfernoo

Sorry, to clarify - I think those might be issues with HA core and not adaptive_lighting. You might want to try checking over in the HA core repo.

regoras avatar Feb 03 '21 20:02 regoras

Yes, I think that could be the case... But I really don't know, as it seems to not be happening to most of my lights, and doesn't happen to any of my lights that aren't both locally controlled and "adapting". That makes me think that it is something in this integration is affecting it.

drinfernoo avatar Feb 03 '21 20:02 drinfernoo

stale

th3w1zard1 avatar Apr 01 '23 05:04 th3w1zard1