I am using hass to (among others) automate my heating at home. I want it to turn on at 16:00:00 (so before I get home) to have it nice an cosy when I arrive at home. However, this is only valid on days where I have been home earlier (i.e. I am not on vacation).
I there a way to look back in time (e.g. using the “history” functionality) to check, whether my group of devices has been home within the last 12 hours? If so, what is the easiest way to do so?
I did look through the documentation but could not find anything on that topic.
Create an input boolean to track the “holiday” state. Then you have one automation to turn it off when anybody comes home, and other that turns it on if the group has been not_homefor 12 hours. Use that being off as a condition in your heating automation.
You could also use the Google travel time component, look at how far away you are. You could even link it in with turning on the heating when you’re heading towards home, and within a certain amount of time from home.