mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-07-28 04:17:35 +00:00
71 lines
1.7 KiB
YAML
Executable File
71 lines
1.7 KiB
YAML
Executable File
######################################################################
|
|
## Shut it all down. No one is here
|
|
# @CCOSTAN
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
|
######################################################################
|
|
|
|
# Define an alias for this automation
|
|
- alias: 'Away Mode'
|
|
id: 712e845a-9d72-4993-b8af-890b167c807b
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: group.family
|
|
to: 'not_home'
|
|
- platform: sun
|
|
event: sunrise
|
|
offset: '-02:00:00'
|
|
- platform: sun
|
|
event: sunset
|
|
offset: '+00:30:00'
|
|
- platform: time
|
|
at:
|
|
- '03:00:00'
|
|
- '12:00:00'
|
|
|
|
condition:
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: 'not_home'
|
|
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
|
|
action:
|
|
- service: lock.lock
|
|
entity_id: lock.front_door
|
|
|
|
- service: script.interior_off
|
|
- service: switch.turn_off
|
|
entity_id: switch.back_landscaping
|
|
|
|
|
|
# Set thermostats to eco mode when everyone is away
|
|
- alias: 'Set Thermostats to Eco When Away'
|
|
id: 1e2d3c4b-eco-thermostat-away
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: group.family
|
|
to: 'not_home'
|
|
condition:
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: 'not_home'
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
action:
|
|
- service: climate.set_preset_mode
|
|
data:
|
|
entity_id:
|
|
- climate.downstairs
|
|
- climate.upstairs
|
|
preset_mode: 'eco'
|
|
- service: script.notify_engine
|
|
data:
|
|
title: "Thermostat Eco Mode Triggered"
|
|
value1: "DEBUG: Everyone is gone and the Automation was triggered."
|
|
who: "carlo"
|