From: 'home' / to: 'not_home' -> As trigger if other zones exist?

Hi, i noticed that my automation trigger for device.tracker:

  from: 'not_home'
  to: 'home'

or:

 from: 'home'
 to: 'not_home'

do not fire when i’m in another pre-defined zone. I was under the impression that “not_home” is for any state/zone which is NOT home. I just tested with a GPS spoofer, and “not_home” only triggers when i’m away => not in another pre-defined zone. Is this correct behaviour?

In this case, I guess its better to limit the automation with a condition? ie.:
instead of:

to: 'not_home' 
from: 'home'

I’d just do:

  from: 'home'
condition:
  condition: template
  value_template: "{% if not is_state('trigger.to_state.state', 'home') %}true{% endif %}"

You can use just from: or to: if you want

So:

from: 'home'

will be fine

1 Like

True… i dont even need the extra condition, as the state can only change to home if its not home… was thinking way to complicated again :wink:

so instead of:
to: 'not_home'
just:
from: 'home'

Thanks :slight_smile: