Any solution for when in another zone (work etc.) but you need to use away condition for your automation?

My automation is set to
Trigger “ when my front door is closed for 1 hour”
Condition “ If I am away”
Action “ lock my front door”

The problem is when I go to work my door never lock because my condition did not pass. ( I also set zone for work and it less than 1 hour to go there).

Any solution for this?

change to not at home

something like this

description: ""
mode: single
triggers:
  - trigger: state
    entity_id:
      - person.warlion
conditions:
  - condition: not
    conditions:
      - condition: state
        entity_id: person.warlion
        state: home
actions: []

1 Like

If you want to know if everyone is away, then a state condition for zone.home is 0 will do that. That will work for any number of people living there.

2 Likes


I dont know how to set it to not home. Its not available in UI and in yaml its said unknown condition

That’s not the case but Thanks for responding.

add contition , write “no” select the only option
add condition → entity-> state and select your device

1 Like


Like this?

yes thats correct, this will cause to pass when you are not at home or any other zone

1 Like

Thank you so much. It should work now

1 Like