#Hrm, New to discoord, expecting to be

1 messages · Page 1 of 1 (latest)

bright crater
#
  1. Yes I gave you a fake entity, I picked one that should have been obviously fake
  2. #templates-archived can help with templates
half stirrup
#

To try to conclude:

I got it working, after a lot of trial and error, and the working configuration is

service: homeassistant.set_location
data:
  latitude: "{{ state_attr('device_tracker.phone','latitude')|float }}"
  longitude: "{{ state_attr('device_tracker.phone','longitude')|float }}"

... and WHY it didn't work (immediately) initially without the "trial and horror" is beyond me.

#

The current trigger is simple, timed, once every 15 minutes, next step is to make it update as phone leaves home - maybe still time delayed.

bright crater
#

You can update when the phone updates, using the phone device_tracker as the trigger

#
trigger:
  - platform: state
    entity_id: device_tracker.phone