I’m guessing this is straightforward, but I’m a relative newbie to automations…
I’d like to turn all the lights on for the basement just prior to my roborock (robot vacuum) starting a scheduled run. Many of the robots “see better” with the lights on even though they use lidar and other sensors.
I have a scene to turn all the lights on, that’s not an issue. However, when the robot is done (TBD how to automatically determine that), I’d like to turn all the lights off EXCEPT those that were already on when the automation started (i.e. someone is in a room and had the lights on already).
How do I setup the automation to track the previously on lights so I only turn off those my automation turned on?
NOTE: As said, I’m not sure how to track when the robot is “done”, so I would not be opposed to making it one automation that “sleeps”/waits an hour and then finishes by turning off the lights…maybe that’s easier to track as variables within one automation?
OK, how do I create a scene that knows what lights were turned on by a previous scene action, and not just “all the possible lights”? I only want the “off/done” scene to turn off lights that were not already on.
Are you saying that in my automation, I should first Create a new Scene and somehow enumerate which lights are NOT on, and as I turn those on, add them to the scene (and set the scene to turn them off), save the scene as a new scene and then at the end of the cycle, invoke the scene and delete it?
You can create a temporary scene based on a snapshot of a list of entities’ current state. As you are already using a scene to set the “Roborock mode”, extract the entities from that scene.
The actions to perform before starting the Roborock would be something like this: