The request was one sentence: "when movie mode is enabled, the robot vacuum must not run." I built it and tested it the same day, during a real movie. Doing it properly took three layers, not one: block the start, send the robot home if it is already running, and replay whatever got skipped once the movie ends. On build day the robot also started cleaning mid-movie, and I still can't tell you who started it.
I came up in live events, and every show runs on cues. If a cue is held because the stage isn't ready, someone has to fire it when the stage is ready. Otherwise the show just loses it.
Home automation has the same trap. A cleaning job runs because something triggered it. If a condition says "not now" at that moment, the trigger has passed, and nothing ever comes back to retry it. Blocking the vacuum is easy. Blocking it without losing the clean is the job, and that means every veto needs a matching re-arm.
The movie check is now the first action in every cleaning job in Home Assistant. If Movie Mode is on, the job writes its own ID to a queue, logs that it was held, and stops.
I put the veto in the actions rather than the conditions on purpose. A failed condition looks the same as a job that was never triggered. An action that queues and stops shows up in the automation's trace, so the skipped clean is recorded, not silently lost.
Asking the voice assistant to start the vacuum during a movie gets a spoken refusal instead. Nothing is queued in that case.
I tested this layer during a real movie by triggering one of the real cleaning jobs by hand. It was vetoed and queued, and the robot stayed docked. A second trigger for the same job didn't create a duplicate entry.
Blocking the start only covers cleans that Home Assistant itself begins. The robot can also be started from the vendor's app, from the button on the robot, or by resuming after a stuck alert. So the second layer watches the robot, not the jobs. It is designed to fire when Movie Mode turns on, when the robot starts cleaning or pauses, and on a five-minute backstop in case either of those edges is missed.
The judgment call was what to do with a paused robot. A paused robot vacuum is parked mid-floor, a trip hazard in a dark room. So paused counts as running, and I chose dock over pause.
If the clean that is being docked came from a Home Assistant job that fired within five minutes of the clean starting, that job goes back on the queue. A run started outside Home Assistant is docked but not replayed, because there is no job to replay.
To be honest: this layer is switched on but hasn't fired live yet. That is how it is designed to behave, not something I have watched it do.
Once Movie Mode has been off for two minutes, the replay can start. It runs one queued job at a time, oldest first, and waits until the robot has been docked for ten minutes before starting the next one. A 15-minute backstop covers a missed edge.
Two details matter:
I proved the replay live with a temporary self-test job that went through the queue without the robot actually cleaning, then deleted the test automation afterwards.
On build day the robot started cleaning mid-movie. It was sent home from the app 38 seconds later.
Every schedule in the vendor's app was off. The logbook showed no Home Assistant automation, script or voice event behind it. The vacuum's state is polled, so when it changes from docked to cleaning, nothing records who asked. "No context" in the log doesn't prove Home Assistant didn't start it. It only proves the log can't say.
The remaining suspects include the button on the robot and a manual call through Home Assistant. I never found out. The dock-if-running layer is designed to send it home within seconds next time, whoever starts it, but until it fires for real that is a design, not a result.
The tempting version of "must not run" is a single rule: add a condition and move on. It passes every test you would run during the movie, and it quietly loses every clean the movie covered. The re-arm is what made this a three-part build.
What it does: keeps a robot vacuum from running while a "movie mode" flag is on, sends it home if it starts anyway, and replays the skipped cleans afterward. The parts:
How the pieces fit: jobs check the flag and queue themselves, the guard docks a running or paused robot, and the replay pops one job at a time once the flag stays off.
If you have a veto somewhere in your own setup that never gets a second chance, I would like to hear about it.