diff --git a/.HA_VERSION b/.HA_VERSION index b41d75d..46ac5ca 100644 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -2022.8.0 \ No newline at end of file +2022.10.4 \ No newline at end of file diff --git a/automations.yaml b/automations.yaml index fe51488..0637a08 100644 --- a/automations.yaml +++ b/automations.yaml @@ -1 +1 @@ -[] +[] \ No newline at end of file diff --git a/blueprints/automation/homeassistant/notify_leaving_zone.yaml b/blueprints/automation/homeassistant/notify_leaving_zone.yaml index 71abf8f..1dc8a0e 100644 --- a/blueprints/automation/homeassistant/notify_leaving_zone.yaml +++ b/blueprints/automation/homeassistant/notify_leaving_zone.yaml @@ -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"