mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
103 lines
2.8 KiB
YAML
103 lines
2.8 KiB
YAML
alias: House Mode Change
|
|
id: automation_house_mode_change
|
|
mode: queued
|
|
|
|
# Detect when something changes and/or when Home Assistant Starts
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- input_boolean.home_occupied
|
|
- input_boolean.bedtime
|
|
- sensor.people_count
|
|
|
|
- platform: homeassistant
|
|
event: start
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.home_occupied
|
|
state: "off"
|
|
sequence:
|
|
- action: input_select.select_option
|
|
data:
|
|
entity_id: input_select.house
|
|
option: "Away"
|
|
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.home_occupied
|
|
state: "on"
|
|
|
|
- condition: state
|
|
entity_id: sensor.people_count
|
|
state: "1"
|
|
sequence:
|
|
- action: input_select.select_option
|
|
data:
|
|
entity_id: input_select.house
|
|
option: "Bachelor"
|
|
|
|
- action: homeassistant.turn_on
|
|
entity_id:
|
|
- input_boolean.lighting_automations
|
|
- input_boolean.brightness_automations
|
|
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.home_occupied
|
|
state: "on"
|
|
- condition: numeric_state
|
|
entity_id: sensor.people_count
|
|
above: 1
|
|
below: 4
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.emmett_home
|
|
state: "on"
|
|
- condition: state
|
|
entity_id: input_boolean.bridget_home
|
|
state: "on"
|
|
|
|
sequence:
|
|
- action: input_select.select_option
|
|
data:
|
|
entity_id: input_select.house
|
|
option: "Dad"
|
|
- action: homeassistant.turn_on
|
|
entity_id:
|
|
- input_boolean.lighting_automations
|
|
- input_boolean.brightness_automations
|
|
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.house
|
|
state: "Guest"
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
entity_id:
|
|
- input_boolean.lighting_automations
|
|
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.house
|
|
state: "Manual"
|
|
sequence:
|
|
- action: homeassistant.turn_off
|
|
entity_id:
|
|
- input_boolean.lighting_automations
|
|
- input_boolean.brightness_automations
|
|
|
|
default:
|
|
- action: input_select.select_option
|
|
data:
|
|
entity_id: input_select.house
|
|
option: "Auto"
|
|
|
|
- action: homeassistant.turn_on
|
|
entity_id:
|
|
- input_boolean.lighting_automations
|
|
- input_boolean.brightness_automations
|