Improve vacation mode
This commit is contained in:
@ -522,6 +522,130 @@ automation:
|
|||||||
data:
|
data:
|
||||||
value: 0
|
value: 0
|
||||||
|
|
||||||
|
- id: 1061c626-17c1-4f0b-8f55-2afc60ef8a3a
|
||||||
|
alias: Vacation Mode
|
||||||
|
trigger:
|
||||||
|
- platform: template
|
||||||
|
value_template: >
|
||||||
|
{% set tony = states('sensor.tony_s_iphone_travel_time_min') | float %}
|
||||||
|
{% set tina = states('sensor.tinas_iphone_travel_time_min') | float %}
|
||||||
|
{{ is_state('input_boolean.vacation_mode','off') and (tony >= 90) and (tina >= 90) }}
|
||||||
|
id: leave-radius
|
||||||
|
- platform: state
|
||||||
|
entity_id: group.adults
|
||||||
|
not_from:
|
||||||
|
- 'unknown'
|
||||||
|
- 'unavailable'
|
||||||
|
to: 'home'
|
||||||
|
id: arrive-home
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
state: 'off'
|
||||||
|
action:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: leave-radius
|
||||||
|
sequence:
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.vacation_mode
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: arrive-home
|
||||||
|
sequence:
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.vacation_mode
|
||||||
|
|
||||||
|
- id: d759a27e-5e7a-4b2c-bf0c-e4378f38dc17
|
||||||
|
alias: Vacation Tasks
|
||||||
|
description: Tasks to run when vacation mode is triggered
|
||||||
|
mode: restart
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: input_boolean.vacation_mode
|
||||||
|
to: 'on'
|
||||||
|
not_from:
|
||||||
|
- 'unknown'
|
||||||
|
- 'unavailable'
|
||||||
|
id: vacation-on
|
||||||
|
- platform: state
|
||||||
|
entity_id: input_boolean.vacation_mode
|
||||||
|
to: 'off'
|
||||||
|
not_from:
|
||||||
|
- 'unknown'
|
||||||
|
- 'unavailable'
|
||||||
|
id: vacation-off
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
state: 'off'
|
||||||
|
action:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: vacation-on
|
||||||
|
sequence:
|
||||||
|
- service: fan.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: all
|
||||||
|
- service: climate.set_hvac_mode
|
||||||
|
target:
|
||||||
|
entity_id: climate.master_bedroom_aircon
|
||||||
|
data:
|
||||||
|
hvac_mode: 'off'
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: switch.presence_simulation
|
||||||
|
state: 'off'
|
||||||
|
then:
|
||||||
|
- service: light.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: all
|
||||||
|
- service: switch.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: switch.presence_simulation
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: vacation-off
|
||||||
|
sequence:
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.hot_day
|
||||||
|
- binary_sensor.heat_warning
|
||||||
|
- binary_sensor.heat_threshold
|
||||||
|
- binary_sensor.heat_index_threshold
|
||||||
|
state: 'on'
|
||||||
|
then:
|
||||||
|
- service: fans_on
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- fan.emma_air_conditioner
|
||||||
|
- fan.kallen_bedroom_fan
|
||||||
|
- service: climate.set_hvac_mode
|
||||||
|
target:
|
||||||
|
entity_id: climate.master_bedroom_aircon
|
||||||
|
data:
|
||||||
|
hvac_mode: cool
|
||||||
|
- service: climate.set_preset_mode
|
||||||
|
target:
|
||||||
|
entity_id: climate.master_bedroom_aircon
|
||||||
|
data:
|
||||||
|
preset_mode: eco
|
||||||
|
- service: climate.set_temperature
|
||||||
|
target:
|
||||||
|
entity_id: climate.master_bedroom_aircon
|
||||||
|
data:
|
||||||
|
temperature: "{{ states('input_number.master_bedroom_daytime_temp') | int }}"
|
||||||
|
- service: climate.set_fan_mode
|
||||||
|
target:
|
||||||
|
entity_id: climate.master_bedroom_aircon
|
||||||
|
data:
|
||||||
|
fan_mode: Auto
|
||||||
|
|
||||||
script:
|
script:
|
||||||
family_is_away:
|
family_is_away:
|
||||||
alias: Family Is Away
|
alias: Family Is Away
|
||||||
|
@ -363,43 +363,6 @@ automation:
|
|||||||
- switch.adaptive_lighting_living_room
|
- switch.adaptive_lighting_living_room
|
||||||
- switch.adaptive_lighting_tina_lamp
|
- switch.adaptive_lighting_tina_lamp
|
||||||
|
|
||||||
- id: 1061c626-17c1-4f0b-8f55-2afc60ef8a3a
|
|
||||||
alias: Vacation Mode
|
|
||||||
trigger:
|
|
||||||
- platform: template
|
|
||||||
value_template: >
|
|
||||||
{% set tony = states('sensor.tony_s_iphone_travel_time_min') | float %}
|
|
||||||
{% set tina = states('sensor.tinas_iphone_travel_time_min') | float %}
|
|
||||||
{{ is_state('input_boolean.vacation_mode','off') and (tony >= 90) and (tina >= 90) }}
|
|
||||||
id: leave-radius
|
|
||||||
- platform: state
|
|
||||||
entity_id: group.adults
|
|
||||||
not_from:
|
|
||||||
- 'unknown'
|
|
||||||
- 'unavailable'
|
|
||||||
to: 'home'
|
|
||||||
id: arrive-home
|
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.guest_mode
|
|
||||||
state: 'off'
|
|
||||||
action:
|
|
||||||
- choose:
|
|
||||||
- conditions:
|
|
||||||
- condition: trigger
|
|
||||||
id: leave-radius
|
|
||||||
sequence:
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.vacation_mode
|
|
||||||
- conditions:
|
|
||||||
- condition: trigger
|
|
||||||
id: arrive-home
|
|
||||||
sequence:
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.vacation_mode
|
|
||||||
|
|
||||||
- id: 027f6f05-289f-4f3d-925e-54d95226ea34
|
- id: 027f6f05-289f-4f3d-925e-54d95226ea34
|
||||||
alias: Security Schedules Reset
|
alias: Security Schedules Reset
|
||||||
trigger:
|
trigger:
|
||||||
|
Reference in New Issue
Block a user