Device tracker, trigger on either one not_home, or both home, but not if one is home

Yes…
And I believe the device trackers are created in the known_devices as I updated my post above with.

hehe, did a google on know decives:

As of 0.94 known_devices.yaml is being phased out and no longer used by all trackers.

but will try with the automations anyway

It only says the file is not used by integrations.
You still use it to create manual devices.

got some errors so for me i ended up with:

alias: Opdater Bo
description: ''
trigger:
  - entity_id: sensor.sm_a515f_wifi_bssid
    platform: state
    to: 'BSSID HERE'
condition: []
action:
  - data_template:
      dev_id: person.bo_herrmannsen_5
      location_name: |
        {% if is_state('sensor.sm_a515f_wifi_bssid', 'BSSID HERE') -%}
          home
        {%- else -%}
          not_home
        {%- endif %}
    service: device_tracker.see
mode: single

and one like it but instead of to i say from, of course i could prob fill in both to and from

Does that work?
To set the location of a person with device_tracker.see? I didn’t think that was possible.

dont know yet if it works… i just copied out from the link

let me see if it accepts without the last line

if i remove it i get

Message malformed: must contain at least one of service, service_template. @ data[‘action’][0]

and that was also the error i tried to solve before i blind copied the example

but i need to go and pickup a parcel so time will soon tell

I believe you need to create your own device trackers.
The documentations does not say you can use device_tracker.see on people. Perhaps you can.
But I would probably not even try.

Also I believe if you use a choose then you only need one automation per device tracker.

Choose option 1 template {{ bssid == “bssid”}}
home
Choose option 2 template {{ bssid !== “bssid”}}
not_home

or something like it

changed everything to deivce based

since we only have one phone each it does not matter if i look at person or device, but when you have same brand of phone and also nearly the same model it becomes “tricky” to know which is what

time to go and get that parcel and see if the update automations at least triggers

why are you not using the ping as device tracker

That is polling.
And as soon as the phone(s) go to sleep they are not home anymore.
The app does not have that behaviour

for this reason I’m using https://github.com/mudape/iphonedetect
if you have iphones you can try it. not sure if it will work for androids

i dont and i never will have an apple product, and the reason is their “we know best what you want” philosophy, and their stand on right to repair

they make great hardware and for what i know also software… but the 2 things make it stink worse than a sewage plant

1 Like

anyways, the automations did not trigger

for myself it’s:

alias: Opdater Bo
description: ''
trigger:
  - entity_id: sensor.sm_a515f_wifi_bssid
    platform: state
    to: '****'
    from: '****'
condition: []
action:
  - data_template:
      dev_id: device_tracker.sm_a515f
      location_name: |
        {% if is_state('sensor.sm_a515f_wifi_bssid', '****') -%}
          home
        {%- else -%}
          not_home
        {%- endif %}
    service: device_tracker.see
mode: single

i have the bssid in both to and from as to update both when i get home and when i leave
and the automation that turns on the light, even thou the other is important so figure first:

alias: Tænd lys når hjemme
description: ''
trigger:
  - platform: state
    entity_id: group.device_trackers
    to: home
condition:
  - condition: sun
    before: sunrise
    after: sunset
action:
  - type: turn_on
    device_id: ****
    entity_id: light.kitchen_1
    domain: light
    brightness_pct: 60
  - type: turn_on
    device_id: ****
    entity_id: light.kitchen_2
    domain: light
    brightness_pct: 60
mode: single

groups.yaml:

device_trackers:
  name: Device Trackers
  entities:
    - device_tracker.sm_a405fn
    - device_tracker.sm_a515f

I believe, if you leave both to and from in trigger empty then it will trigger on any change

will know by tomorrow, no more trips today and its to cold to go out just for fun (-3C)

I haven’t tested this app, but another one has worked fine a few years ago when I needed it.

I just noticed the description, perhaps you can try a different one. The one I used worked flawlessly

was about to say that what about the bssid, but of course just disconnect from wifi

will give it a shot after dinner

the fake gps’s have trouble with android 10

but the update automations work… turning wifi off and waiting a bit is enough to trigger them

will try and find a gps app that works, if nothing else i will give it a go next time i’m out