sesa
(Sebastian)
July 7, 2020, 1:08pm
1
Hello everyone!
I have just bought a few tiles and I would like to send notifications when I leave for example my keys behind. I’m currently tracking my location with iPhone app.
Maybe if it would be possible to create a zone around a device. Then I would be able to create automation when my phone leaves zones keys send notification. This is something that is not yet possible what I know of.
Any other suggestions on how to get this to work?
I don’t use tiles. Can you explain how they appear in HA? I.e., what does their state & attributes look like?
sesa
(Sebastian)
July 11, 2020, 9:58pm
3
Sure, the only state that would help is last know location of the tile device in latitude and longitude. Tile devices appear as device_tracker.
So if it would be possible to automate notification when my phone is too far away from my tile.
Ok, if they’re device_tracker
entities, then you can use the distance() function in a template trigger , something like:
- trigger:
- platform: template
value_template: "{{ distance('device_tracker.me', 'device_tracker.tile') > N }}"
action:
# Send notification
- service: ...
N is either miles or kilometers, depending on the unit system you’re using, and can be a float
(e.g., 0.5
.)
1 Like
sesa
(Sebastian)
July 14, 2020, 6:55am
6
Follow-up question, am I able to add a time condition to value_template?
I would like to trigger action when I have been away from my keys for X minutes/seconds
Yes. See the docs for the template trigger. Use the “for
” option.
shub2021
(Shubendu Das)
January 3, 2021, 6:34am
8
How exactly to set it up in iphone shortcuts app?
pnpruckers instructions, Im not understanding them