I have created an automation that I need a little push in the correct direction for how to program for an exception situation that occurs.
I have hass.agent sending my desktop microphone process status to HA. I have two lights (a kauf bulb and a wyze bulb) turn red to let others in the home know that I am on the phone. I do this by having the automation perform the following:
I have two trigger states: changing to “Softphone” and changing from “Softphone” - both of them have IDs
The action is a CHOOSE
Option 1:When the status changes to “Softphone”, IF kauf bulb is on for 10 seconds, THEN create a scene of its current state, call service light.turn_on to change the color to darkred. And the same for the wyze bulb.
Option 2: When the status changes from “Softphone”, IF Kauf bulb is on, THEN change SCENE “bulb previous state”. and same for the wyze bulb.
Situation 1
How do I program for the situation that someone turns off the light while it is red? When they turn it back on, it is set to always on previous state in the bulb settings.
Situation 2
How do I program for the situation when someone turns on the light long after I am on the phone and the trigger has run
If I set the automation to repeat, it will overwrite the temporary scene.