Zone change Automation tigger

Hello,

It is possible to configure and tigger in automations? I whant to do something when i entering to Home zone from a specific zone. For example: turn lights on when im fast home.
trigger what i whant to configure: when person A leaving zone ‘fast home’ and entering zone ‘home’

Yes. Have you tried? It’s an option in the automation UI under Trigger.

there is only if enter or if leave but not between 2 zones. I cant say if from zone 1 into zone 2.

In the condition - you would need to use a template, to find out if the person was previously in the other zone.

Example:
Zone: zone.somewhere_else
Person: person.andy_jones

Condition (template):

{{ 'person.andy_jones' in trigger.from_state.attributes.persons and trigger.entity_id == 'zone.somewhere_else' }}

Edit: this is going to be more complicated than this - hold on, let me think about this.

1 Like

I don’t use the UI for writing automations but you should be able to write the trigger using a state trigger based on your person entity and using the “from:” and “to:” settings using your desired zone names.

1 Like

What @finity said is what I was thinking too.
Because it’s a specific person you want to move from one state to another - and the state of a person is the zone they are in (or not_home) - then using a state trigger is the way to achieve this.

from: fast home
to: home