Hey all,
I had an idea for an automation I’d like to create but I don’t know how to go about doing it. The idea is:
Every time I enter specific zones I’ve defined I’d like to get a push notification telling me:
- The last time I was in that zone (probably the time when I left the zone.)
- How long time has passed since I was there
- …and possibly, how long time I spent there last time I was there.
To get 1 and 2, I somehow need to - every time I leave the specific zone(s), update some kind of variable (or sensor?) with a timestamp - like “last_time_left_office” … and then use that value in a magic template for my push notification.
I think my biggest hurdle (for now) is how to best store that value. Do I use an input_text? Do I publish to MQTT? Needless to say, the value has to survive restarts/reboots… If anyone can give me some advice I’d be most grateful. Thanks!