Fix notify leaving zone blueprint (#65056)

pull/65442/head
Martin Hjelmare 2022-01-27 17:37:40 +01:00 committed by Paulus Schoutsen
parent 6f8b0a01b4
commit 8afb0aa44a
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,9 @@ variables:
condition:
condition: template
value_template: "{{ trigger.from_state.state == zone_state and trigger.to_state.state != zone_state }}"
# The first case handles leaving the Home zone which has a special state when zoning called 'home'.
# The second case handles leaving all other zones.
value_template: "{{ zone_entity == 'zone.home' and trigger.from_state.state == 'home' and trigger.to_state.state != 'home' or trigger.from_state.state == zone_state and trigger.to_state.state != zone_state }}"
action:
- alias: "Notify that a person has left the zone"