mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
id: set_house_to_early_afternoon
|
||||
alias: Set House to Early Afternoon
|
||||
mode: single
|
||||
# Testing if this will update, save, and push just fine
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.early_afternoon
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_afternoon
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Early Afternoon
|
||||
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id:
|
||||
- input_boolean.clint_needs_pm_meds
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Early Afternoon
|
||||
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,26 @@
|
||||
id: set_house_to_early_evening
|
||||
alias: Set House to Early Evening
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.early_evening
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_evening
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Early Evening
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Early Evening
|
||||
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,33 @@
|
||||
id: set_house_to_early_morning
|
||||
alias: Set House to Early Morning
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.early_morning
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_morning
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Early Morning
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Early Morning
|
||||
|
||||
- service: homeassistant.turn_on
|
||||
entity_id:
|
||||
- input_boolean.clint_needs_am_meds
|
||||
|
||||
- service: homeassistant.turn_off
|
||||
data:
|
||||
entity_id:
|
||||
- input_boolean.mail_checked
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,26 @@
|
||||
id: set_house_to_evening
|
||||
alias: Set House to Evening
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.evening
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.evening
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Evening
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Evening
|
||||
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,26 @@
|
||||
id: set_house_to_late_afternoon
|
||||
alias: Set House to Late Afternoon
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.late_afternoon
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.late_afternoon
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Late Afternoon
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Late Afternoon
|
||||
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,76 @@
|
||||
id: set_house_to_late_evening
|
||||
alias: Set House to Late Evening
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.late_evening
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.late_evening
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Late Evening
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Late Evening
|
||||
|
||||
# The kids should be asleep by now...
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.nursery_hub
|
||||
state: 'playing'
|
||||
sequence:
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.nursery_hub
|
||||
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,119 @@
|
||||
id: set_house_to_late_morning
|
||||
alias: Set House to Late Morning
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.late_morning
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.late_morning
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Late Morning
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Late Morning
|
||||
|
||||
# Everyone should be awake by now...
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_in_bed
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.marshall_in_bed
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.marshall_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_in_bed
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.tess_in_bed
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.tess_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,30 @@
|
||||
id: set_house_to_morning
|
||||
alias: Set House to Morning
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.morning
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.morning
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Morning
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Morning
|
||||
|
||||
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_asleep
|
||||
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,53 @@
|
||||
id: set_house_to_night
|
||||
alias: Set House to Night
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.night
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.night
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: Night
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.time_of_day
|
||||
option: Night
|
||||
|
||||
- delay: '00:00:30'
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_in_bed
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.marshall_in_bed
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.marshall_is_awake
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_in_bed
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.tess_in_bed
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.tess_is_awake
|
||||
@@ -0,0 +1,29 @@
|
||||
alias: Set Time of Day
|
||||
id: automation_set_time_of_day
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data_template:
|
||||
entity_id: input_select.time_of_day
|
||||
option: >-
|
||||
{% if is_state('binary_sensor.early_morning', 'on') %}
|
||||
Early Morning
|
||||
{% elif is_state('binary_sensor.morning', 'on') %}
|
||||
Morning
|
||||
{% elif is_state('binary_sensor.late_morning', 'on') %}
|
||||
Late Morning
|
||||
{% elif is_state('binary_sensor.early_afternoon', 'on') %}
|
||||
Early Afternoon
|
||||
{% elif is_state('binary_sensor.late_afternoon', 'on') %}
|
||||
Late Afternoon
|
||||
{% elif is_state('binary_sensor.early_evening', 'on') %}
|
||||
Early Evening
|
||||
{% elif is_state('binary_sensor.evening', 'on') %}
|
||||
Evening
|
||||
{% elif is_state('binary_sensor.late_evening', 'on') %}
|
||||
Late Evening
|
||||
{% else %}
|
||||
Night
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user