I’m just getting started and I’m enjoying learning, so I don’t want a full fledged solution to my issue, just ideas for how to accomplish what I’m trying to do.
Basically, I want an automation to trigger when both my wife and I leave the house that vacuums the front room if it has been over 2 weeks, vacuums the family room if it has been more than 1 week, and vacuums the kitchen and table if it has been over a day.
I don’t need specifics for triggering an automation when we leave or how to trigger the Roomba. But I’m not sure how I might go about tracking the last run of each zone, or even if I did, how I could use that information to trigger a different zone depending on the timing.
A thought I had about the second half is to just create a script for each zone with a condition that checks the last run time, and just call every script from the automation. But I still don’t know how to track that. And maybe there is a better way.
Like I said, I don’t need a full solution, just some ideas to look into.
I have a different robo vacuum which performs essentially the same function. I believe that you are currently able to control the vacuum from HA to clean a zone or a room. There is a major problem that with tracking that I have seen in my system i,e if you are using the mobile app or alexa skill to start the vacuum, HA will not be able to see which room it is cleaning instead the status will only be docked. If we are controlling the robot only with HA using scripts to clean a zone, the tracking of when you are cleaning a room is easy as we only need to track the working of the script. If this is the situation with your robot also, first make sure that you only control the vacuum with HA.
Secondly to track the timeperiod of cleaning, you can use the input date-time sensor to update the date and time of cleaning after a room has been cleaned. Then use this to compare with the current date and time to determine the tolerance period is over or not.
Hope this helps. If you have anything to ask, please do
If you create an automation (or script) in HA to vacuum a particular zone, you can always access the last_triggered attribute of the automation itself as the basis for timing its next run.