Hi i was using the states card before to see when persons.rodz was away for 2 hrs as a condition. However since I set up some zones, if I leave my home and get to work then im “home” again.
I was wondering if I could achieve this with a template but was unsure how to get person and zones in the template.
I have
{{ (as_timestamp(now())-as_timestamp(states.person.rodz.last_changed, ‘away’))/60 > 120}}
sorry this is my problem, I basically want to know when im away from the home zone for 2h. Previously I could use home and away, but now Ive set a work zone this is no longer an viable method.
That worked perfectly, thanks. I had an issue where it said i was home but i noticed my ipad had been added to the device tracker. So removed that, with a few reboots its working as expected. Just need to test.
This is why I asked about the problem… You likely need to change the user that your ipad and any other normally-at-home devices are using to log into HA. If you have “Allow person to login” enabled for your person entity, you will continue to experience this problem.
I was wondering why the iPad device tracker kept being added. That’s good advice I’ll do that.
Ive been able to use zones in conditions for most my automations now and a few triggers too. I have the Rodz home sensor to use state change for time. Think I have it all covered now.