I’m a little bit stumped by this one because the automation clearly indicates that the light should turn on, but instead sometimes the light turns off. It doesn’t happen all the time and I haven’t been able to figure a pattern to it.
If you look in the related log book entries, it clearly says that the light was turned off by the automation. However nowhere in the automation is it being told to turn off.
When you go to the device in the tuya integration, there you can see the automations where the device is related to, just to rule out there isn’t another automation.
I mean there is another automation it’s tied to… The automation that’s triggered when that same motion sensor stops detecting motion (for 15 minutes).
However, that automation can’t be the culprit since it turns off all of the lights in the master bathroom (using a lighting group), but the potty light dimmer switch is the only one that’s exhibiting this odd behavior. Again too, it’s happening inconsistently.
Edit: I’d normally just chalk it up to something funky on the Tuya end of things (or with the dimmer switch itself), but the log event is throwing me for a loop and making me wonder if the issue may be with either HA or the Tuya integration.
Btw, I’m using the Tuya cloud integration, not Local Tuya.
I had some time ago a Wemo device acting the same way as yours, although I can’t remember the log, not sure it reported triggered by automation.
Anyway, replacing the device fixed it in my case.
Maybe before replacing it, delete the device from the other automation first?