initial_state: 'on'
trigger:
- platform: state
- entity_id: input_boolean.home_mode_away
- to: 'on'
+ - platform: state
+ entity_id: input_boolean.home_mode_away
+ to: 'on'
action:
- service: script.notify_voice
initial_state: 'on'
trigger:
- platform: state
- entity_id: input_boolean.home_mode_away
- to: 'off'
+ - platform: state
+ entity_id: input_boolean.home_mode_away
+ to: 'off'
action:
- service: script.notify_voice
initial_state: 'on'
trigger:
- - platform: zone
- entity_id:
- - device_tracker.google_maps_115265981849847357125
- - device_tracker.google_maps_103158638433668748797
- # - device_tracker.google_maps_113099283296073047871
- zone: zone.casa
- event: enter
+ - platform: state
+ entity_id: group.residents
+ to: 'home'
- platform: template
value_template: "{{ states('sensor.time_date') == (state_attr('input_datetime.away_mode_end', 'timestamp') | int | timestamp_custom('%H:%M, %Y-%m-%d', true)) }}"
initial_state: 'on'
trigger:
- - platform: zone
- entity_id:
- - device_tracker.google_maps_115265981849847357125
- - device_tracker.google_maps_103158638433668748797
- zone: zone.casa
- event: leave
+ - platform: state
+ entity_id: group.residents
+ from: 'home'
- platform: homeassistant
event: start
condition:
condition: template
value_template: >-
- {{ (not is_state('device_tracker.google_maps_115265981849847357125', state_attr('zone.casa', 'friendly_name'))) and
- (not is_state('device_tracker.google_maps_103158638433668748797', state_attr('zone.casa', 'friendly_name'))) }}
+ {{ not is_state('group.residents', 'home') }}
action:
- service: input_boolean.turn_on
initial_state: 'on'
trigger:
- - platform: zone
- entity_id:
- - device_tracker.google_maps_115265981849847357125
- - device_tracker.google_maps_103158638433668748797
- zone: zone.casa
- event: enter
+ - platform: state
+ entity_id: group.residents
+ to: 'home'
- platform: homeassistant
event: start
condition:
- condition: or
- conditions:
- - condition: zone
- entity_id: device_tracker.google_maps_115265981849847357125
- zone: zone.casa
- - condition: zone
- entity_id: device_tracker.google_maps_103158638433668748797
- zone: zone.casa
+ condition: template
+ value_template: >-
+ {{ is_state('group.residents', 'home') }}
action:
- service: input_boolean.turn_off
- device_tracker.google_maps_115265981849847357125
- device_tracker.google_maps_103158638433668748797
# - device_tracker.google_maps_113099283296073047871
- zone: zone.casa
+ zone: zone.home
event: enter
# - platform: state
# entity_id:
# timeout: '00:30:00'
# continue_on_timeout: 'false'
- - wait_template: >-
- {% if is_state('binary_sensor.porta_casa_stato', 'on') %}
- true
- {% else %}
- false
- {% endif %}
-
+ - wait_template: "{{ is_state('binary_sensor.porta_casa_stato', 'on') }}"
timeout: '00:30:00'
continue_on_timeout: 'false'
{# Car Status #}
{%- macro status_car() -%}
- {% if is_state('device_tracker.wdd1760081v167576', state_attr('zone.casa', 'friendly_name')) %}
+ {% if is_state('device_tracker.wdd1760081v167576', state_attr('zone.home', 'friendly_name')) %}
{% set car_position = "in garage" %}
{% else %}
{% set car_position = "fuori" %}