Closed Blackbird714 closed 1 year ago
Ok, I finally spotted my error; these lines in my EC config:
trigger_on_activate: reset_al_activate_mbr_floor_light
trigger_on_deactivate: reset_al_deactivate_mbr_floor_light
... it was missing the script. prefix. This should have been:
trigger_on_activate: script.reset_al_activate_mbr_floor_light
trigger_on_deactivate: script.reset_al_deactivate_mbr_floor_light
Sometimes you cannot see the forest for the trees!
Yeah, good spot! I saw the error message and came to the same conclusion. Would be nice to ahve better input validation and error messages. Closing this issue
Description
I have created an entity controller that uses state_entities and scripts to handle on/off for a Govee light strip from SmartThings. I'm using scripts because I'm also using adaptive lighting to manage sleep/color/brightness for the same light.
I'm following a pattern that worked for other lights in my installation, but for just this one EC instance, the EC entity is getting stuck in 'active' state. According to the docs, this is a "momentary, internal state" and my other EC's all behave as described.
As a troubleshooting step, I've tried restarting HA, but the entity seems to always return to the stuck 'active' state. I went so far as uninstalling Entity Controller and reinstalling; shortly after reconfiguring, the behavior returned.
When I can get the problem EC back to idle, when the sensor is triggered, the EC goes to 'active' and says there. I've also observed that if an override is 'on' after reboot the EC goes to 'overridden' and stays there until turned off. But a sensor trigger always seems to end up with the same result (stuck in 'active').
Once stuck in 'active' state, switching to override doesn't work too; I see this message in the logs:
transitions.core.MachineError: "Can't trigger event 'override' from state(s) active!"
This feels like a deadlock or race condition, but I haven't been able to find a good way to isolate root cause.
Configuration
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
This is how the component should work:
Actual Behaviour
This is what actually happened:
Logs
Version
9.6.1