Working from home has been good for me so far, but it messed up my automations based on presence in home assistant.
I have a vacuum robot that is triggered for a scheduled cleanup every weekday at 9:30 am IF I’m not working from home (presence detection via router).
Now as I’m home almost 5 days a week the automation is rarely triggered. That’s why I want a second automation for a cleanup job during a different time (e.g. 7pm) but only if I’m home.
So far no problem. But now I have the case where the first automation in the morning was triggered due to me being at the office and returning before 7pm in the evening. This triggers the second automation.
I need a sensor or variable that is set to e.g. a boolean value or a string value (0 / not cleaned and 1/ cleaned) that is set when the first automation is triggered and used as a condition for the second automation. Ideally this sensor/variable is reset every midnight to 0/not cleaned.
How do I achieve that? I have no clue what to google and where to look. Has someone an example so that I can adapt that to my needs or reverse engineer? I’m not looking for finished code but rather a place to start
Thanks in advance!!
1 post - 1 participant