Browse Source

Split up automations and added button for someone at the door

master
Sean Straus 1 week ago
parent
commit
fe63dba5b1
15 changed files with 2311 additions and 1937 deletions
  1. 596
      automations/air_purifier_automations.yaml
  2. 564
      automations/appliance_automations.yaml
  3. 246
      automations/christmas_automations.yaml
  4. 2
      automations/climate_automations.yaml
  5. 388
      automations/dreamscreen_automations.yaml
  6. 2
      automations/location_automations.yaml
  7. 1056
      automations/other_automations.yaml
  8. 338
      automations/trash_automations.yaml
  9. 11
      configuration.yaml
  10. 134
      lovelace/Tab11_Tech.yaml
  11. 113
      lovelace/Tab1_Home.yaml
  12. 14
      lovelace/Tab1a_Home_Kiosk.yaml
  13. 14
      lovelace/Tab1b_Home_EntranceKiosk.yaml
  14. 768
      lovelace/Tab2_Music.yaml
  15. 2
      www/community/mini-media-player/mini-media-player-bundle.js

596
automations/air_purifier_automations.yaml

@ -0,0 +1,596 @@
############## SOPHIE AIR PURIFIER #############
########### AQI ###############
- id: preserve_sophies_room_aqi
alias: 'Preserve Sophies Room AQI to Variable'
initial_state: 'true'
trigger:
platform: state
entity_id: sensor.sophies_room_aqi
condition:
condition: template
value_template: "{{ not is_state('sensor.sophies_room_aqi', 0) }}"
action:
service: variable.set_variable
data:
variable: sophies_room_aqi
data_template:
value: >
{{ states('sensor.sophies_room_aqi')}}
- id: preserve_sophies_room_aqi_description
alias: 'Preserve Sophies Room AQI description to Variable'
initial_state: 'true'
trigger:
platform: state
entity_id: sensor.sophies_room_aqi_description
condition:
condition: template
value_template: "{{ not is_state('sensor.sophies_room_aqi_description', '0 (Good)') }}"
action:
service: variable.set_variable
data:
variable: sophies_room_aqi_description
data_template:
value: >
{{ states('sensor.sophies_room_aqi_description')}}
############### On/Off #################
- id: turn_on_sophies_air_purifier_if_air_is_bad
alias: "Turn on Sophie's Air Purifier if the air is bad"
initial_state: 'true'
trigger:
platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
condition:
condition: time
after: '19:00:00'
before: '7:00:00'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_on_sophies_air_purifier_if_air_is_bad_2
alias: "Turn on Sophie's Air Purifier if the air is bad 2"
initial_state: 'true'
trigger:
platform: time
at: '19:00:00'
condition:
condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_off_sophies_air_purifier_in_the_morning
alias: "Turn off Sophie's Air Purifier in the morning"
initial_state: 'true'
trigger:
platform: time
at: '8:00:00'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_on_sophie_air_purifier_during_day_if_motion
alias: "Turn on Sophie's Air Purifier During the Day if Motion in Room"
initial_state: 'true'
trigger:
- platform: state
entity_id: binary_sensor.sophies_room_zone_10
to: 'on'
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
- condition: state
entity_id: device_tracker.sophie
state: 'home'
- condition: time
after: '8:00:00'
before: '19:00:00'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_off_sophie_air_purifier_aqi_left_home
alias: "Turn off Sophie's Air Purifier for AQI or Left Home"
initial_state: 'true'
trigger:
- platform: state
entity_id: device_tracker.sophie
from: 'home'
- platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
below: 65
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_off_sophie_air_purifier_if_no_motion
alias: "Turn off Sophie's Air Purifier for No Motion"
initial_state: 'true'
trigger:
- platform: state
entity_id: binary_sensor.sophies_room_zone_10
to: 'off'
for:
minutes: 59
condition:
condition: time
after: '8:00:00'
before: '19:00:00'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sophies_air_purifier
############# Input Select ################
- id: turn_on_sophies_air_purifier_from_input_select
alias: "Turn on Sophie's Air Purifier from Input Select"
initial_state: 'true'
trigger:
platform: state
entity_id: input_boolean.sophies_air_purifier
to: 'on'
condition:
condition: state
entity_id: fan.sophies_room_air_purifier
state: 'off'
action:
- service: fan.turn_on
data:
entity_id: fan.sophies_room_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.sophies_room_air_purifier
speed: Silent
- id: turn_on_sophies_air_purifier_from_input_select_after unavailable
alias: "Turn on Sophie's Air Purifier from Input Select after Unavailable"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sophies_room_air_purifier
from: 'unavailable'
to: 'off'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sophies_air_purifier
state: 'on'
- condition: template
value_template: "{{ (as_timestamp(now())-as_timestamp(states.input_boolean.sophies_air_purifier.last_changed)) < 600 }}"
action:
- service: fan.turn_on
data:
entity_id: fan.sophies_room_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.sophies_room_air_purifier
speed: Silent
- id: turn_off_sophies_air_purifier_from_input_select
alias: "Turn off Sophie's Air Purifier from Input Select"
initial_state: 'true'
trigger:
platform: state
entity_id: input_boolean.sophies_air_purifier
to: 'off'
condition:
condition: state
entity_id: fan.sophies_room_air_purifier
state: 'on'
action:
service: fan.turn_off
data:
entity_id: fan.sophies_room_air_purifier
- id: turn_off_sophies_air_purifier_from_input_select_after unavailable
alias: "Turn off Sophie's Air Purifier from Input Select after Unavailable"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sophies_room_air_purifier
from: 'unavailable'
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sophies_air_purifier
state: 'off'
- condition: template
value_template: "{{ (as_timestamp(now())-as_timestamp(states.input_boolean.sophies_air_purifier.last_changed)) < 600 }}"
action:
service: fan.turn_off
data:
entity_id: fan.sophies_room_air_purifier
- id: sync_sophie_air_purifier_input_boolean_to_manual_on
alias: "Sync Sophie Air Purifier Input Boolean to Manually Turning Air Purifier On"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sophies_room_air_purifier
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sophies_air_purifier
state: 'off'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sophies_air_purifier
- id: sync_sophie_air_purifier_input_boolean_to_manual_off
alias: "Sync Sophie Air Purifier Input Boolean to Manually Turning Air Purifier Off"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sophies_room_air_purifier
to: 'off'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sophies_air_purifier
state: 'on'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sophies_air_purifier
############ SEBASTIAN AIR PURIFIER ##############
######### AQI ##############
- id: preserve_sebastians_room_aqi
alias: 'Preserve Sebastians Room AQI to Variable'
initial_state: 'true'
trigger:
platform: state
entity_id: sensor.sebastians_room_aqi
condition:
condition: template
value_template: "{{ not is_state('sensor.sebastians_room_aqi', 0) }}"
action:
service: variable.set_variable
data:
variable: sebastians_room_aqi
data_template:
value: >
{{ states('sensor.sebastians_room_aqi')}}
- id: preserve_sebastians_room_aqi_description
alias: 'Preserve Sebastians Room AQI description to Variable'
initial_state: 'true'
trigger:
platform: state
entity_id: sensor.sebastians_room_aqi_description
condition:
condition: template
value_template: "{{ not is_state('sensor.sebastians_room_aqi_description', '0 (Good)') }}"
action:
service: variable.set_variable
data:
variable: sebastians_room_aqi_description
data_template:
value: >
{{ states('sensor.sebastians_room_aqi_description')}}
############## On/off ####################
- id: turn_on_sebastians_air_purifier_if_air_is_bad_at_night
alias: "Turn on Sebastian's Air Purifier if the air is bad at night"
initial_state: 'true'
trigger:
platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
condition:
condition: time
after: '19:00:00'
before: '8:00:00'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_on_sebastians_air_purifier_if_air_is_bad_at_night_2
alias: "Turn on Sebastian's Air Purifier if the air is bad at night 2"
initial_state: 'true'
trigger:
platform: time
at: '19:00:00'
condition:
condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_off_sebastians_air_purifier_in_the_morning_or_aqi
alias: "Turn off Sebastian's Air Purifier in the morning or from AQI"
initial_state: 'true'
trigger:
- platform: time
at: '8:00:00'
- platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
below: 65
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_on_sebastians_air_purifier_if_air_is_bad_for_naptime
alias: "Turn on Sebastian's Air Purifier if the air is bad for naptime"
initial_state: 'true'
trigger:
platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
condition:
condition: time
after: '12:30:00'
before: '16:30:00'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_on_sebastians_air_purifier_if_air_is_bad_for_naptime_2
alias: "Turn on Sebastian's Air Purifier if the air is bad for naptime 2"
initial_state: 'true'
trigger:
platform: time
at: '12:30:00'
condition:
condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_off_sebastians_air_purifier_after_nap
alias: "Turn off Sebastian's Air Purifier after nap"
initial_state: 'true'
trigger:
platform: time
at: '16:30:00'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sebastians_air_purifier
###### Input Boolean ########
- id: turn_on_sebastians_air_purifier_from_input_select
alias: "Turn on Sebastian's Air Purifier from Input Select"
initial_state: 'true'
trigger:
platform: state
entity_id: input_boolean.sebastians_air_purifier
to: 'on'
condition:
condition: state
entity_id: fan.sebastians_room_air_purifier
state: 'off'
action:
- service: fan.turn_on
data:
entity_id: fan.sebastians_room_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.sebastians_room_air_purifier
speed: Silent
- id: turn_on_sebastians_air_purifier_from_input_select_after unavailable
alias: "Turn on sebastian's Air Purifier from Input Select after Unavailable"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sebastians_room_air_purifier
from: 'unavailable'
to: 'off'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sebastians_air_purifier
state: 'on'
- condition: template
value_template: "{{ (as_timestamp(now())-as_timestamp(states.input_boolean.sebastians_air_purifier.last_changed)) < 600 }}"
action:
- service: fan.turn_on
data:
entity_id: fan.sebastians_room_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.sebastians_room_air_purifier
speed: Silent
- id: turn_off_sebastians_air_purifier_from_input_select
alias: "Turn off sebastian's Air Purifier from Input Select"
initial_state: 'true'
trigger:
platform: state
entity_id: input_boolean.sebastians_air_purifier
to: 'off'
condition:
condition: state
entity_id: fan.sebastians_room_air_purifier
state: 'on'
action:
service: fan.turn_off
data:
entity_id: fan.sebastians_room_air_purifier
- id: turn_off_sebastians_air_purifier_from_input_select_after unavailable
alias: "Turn off sebastian's Air Purifier from Input Select after Unavailable"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sebastians_room_air_purifier
from: 'unavailable'
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sebastians_air_purifier
state: 'off'
- condition: template
value_template: "{{ (as_timestamp(now())-as_timestamp(states.input_boolean.sebastians_air_purifier.last_changed)) < 600 }}"
action:
service: fan.turn_off
data:
entity_id: fan.sebastians_room_air_purifier
- id: sync_sebastian_air_purifier_input_boolean_to_manual_on
alias: "Sync sebastian Air Purifier Input Boolean to Manually Turning Air Purifier On"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sebastians_room_air_purifier
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sebastians_air_purifier
state: 'off'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: sync_sebastian_air_purifier_input_boolean_to_manual_off
alias: "Sync sebastian Air Purifier Input Boolean to Manually Turning Air Purifier Off"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sebastians_room_air_purifier
to: 'off'
condition:
condition: state
entity_id: input_boolean.sebastians_air_purifier
state: 'on'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sebastians_air_purifier
############ MASTER BEDROOM AIR PURIFIER ##############
########## On / Off ###############
- id: turn_on_master_bedroom_air_purifier_if_air_is_bad_at_night
alias: "Turn on Master Bedroom Air Purifier if the air is bad at night"
initial_state: 'true'
trigger:
platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
condition:
condition: time
after: '21:00:00'
before: '11:00:00'
action:
- service: fan.turn_on
data:
entity_id: fan.master_bedroom_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.master_bedroom_air_purifier
speed: Silent
- id: turn_on_master_bedroom_air_purifier_if_air_is_bad_at_night_2
alias: "Turn on Master Bedroom Air Purifier if the air is bad at night 2"
initial_state: 'true'
trigger:
platform: time
at: '21:00:00'
condition:
condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
action:
- service: fan.turn_on
data:
entity_id: fan.master_bedroom_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.master_bedroom_air_purifier
speed: Silent
- id: turn_off_master_bedroom_air_purifier_in_the_morning_or_aqi
alias: "Turn off Master Bedroom Air Purifier in the morning or from AQI"
initial_state: 'true'
trigger:
- platform: time
at: '11:00:00'
- platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
below: 65
action:
service: fan.turn_off
data:
entity_id: fan.master_bedroom_air_purifier

564
automations/appliance_automations.yaml

@ -203,8 +203,9 @@
condition:
condition: and
conditions:
- condition: template
value_template: '{{ state_attr("timer.bosch_dishwasher_running_door_open", "remaining")=="0:00:00"}}'
- condition: state
entity_id: input_boolean.warn_door_open_dishwasher_running
state: 'on'
- condition: state
entity_id: sensor.bosch_dishwasher_state
state: 'run'
@ -218,11 +219,14 @@
- data:
data:
type: tts
message: "Sorry, it looks like you wanted to run the dishes but you left the door open on the dishwasher."
message: "Sorry, it looks like you wanted to run the dishes but you left the door open on the dishwasher. Please close the dishwasher door."
target:
# - media_player.kichen_bar_kindle_fire
- media_player.alexa_kitchen
- notify.alexa_media_alexa_master_closet
- media_player.alexa_living_room
- media_player.alexa_master_bath
- media_player.master_closet_kindle
- media_player.office_alexa
service: notify.alexa_media
- data:
title: "Dishwasher Update"
@ -230,6 +234,32 @@
service: notify.mobile_app_sean_s_iphone_12
- id: dishwasher_running_door_open_input_boolean_on
alias: dishwasher_running_door_open_input_boolean_on
initial_state: 'true'
trigger:
platform: event
event_type: timer.finished
event_data:
entity_id: timer.bosch_dishwasher_running_door_open
action:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.warn_door_open_dishwasher_running
- id: dishwasher_running_door_open_input_boolean_off
alias: dishwasher_running_door_open_input_boolean_off
initial_state: 'true'
trigger:
platform: state
entity_id: sensor.bosch_dishwasher_door
to: 'closed'
action:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.warn_door_open_dishwasher_running
################### MIELE WASHING MACHINE ####################
# - Empty
@ -536,532 +566,6 @@
data:
push:
thread-id: "appliances"
############## SOPHIE AIR PURIFIER ON OFF #############
- id: turn_on_sophies_air_purifier_if_air_is_bad
alias: "Turn on Sophie's Air Purifier if the air is bad"
initial_state: 'true'
trigger:
platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
condition:
condition: time
after: '19:00:00'
before: '7:00:00'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_on_sophies_air_purifier_if_air_is_bad_2
alias: "Turn on Sophie's Air Purifier if the air is bad 2"
initial_state: 'true'
trigger:
platform: time
at: '19:00:00'
condition:
condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_off_sophies_air_purifier_in_the_morning
alias: "Turn off Sophie's Air Purifier in the morning"
initial_state: 'true'
trigger:
platform: time
at: '8:00:00'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_on_sophie_air_purifier_during_day_if_motion
alias: "Turn on Sophie's Air Purifier During the Day if Motion in Room"
initial_state: 'true'
trigger:
- platform: state
entity_id: binary_sensor.sophies_room_zone_10
to: 'on'
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
- condition: state
entity_id: device_tracker.sophie
state: 'home'
- condition: time
after: '8:00:00'
before: '19:00:00'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_off_sophie_air_purifier_aqi_left_home
alias: "Turn off Sophie's Air Purifier for AQI or Left Home"
initial_state: 'true'
trigger:
- platform: state
entity_id: device_tracker.sophie
from: 'home'
- platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
below: 65
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sophies_air_purifier
- id: turn_off_sophie_air_purifier_if_no_motion
alias: "Turn off Sophie's Air Purifier for No Motion"
initial_state: 'true'
trigger:
- platform: state
entity_id: binary_sensor.sophies_room_zone_10
to: 'off'
for:
minutes: 59
condition:
condition: time
after: '8:00:00'
before: '19:00:00'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sophies_air_purifier
############ SEBASTIAN AIR PURIFIER ON OFF ##############
- id: turn_on_sebastians_air_purifier_if_air_is_bad_at_night
alias: "Turn on Sebastian's Air Purifier if the air is bad at night"
initial_state: 'true'
trigger:
platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
condition:
condition: time
after: '19:00:00'
before: '8:00:00'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_on_sebastians_air_purifier_if_air_is_bad_at_night_2
alias: "Turn on Sebastian's Air Purifier if the air is bad at night 2"
initial_state: 'true'
trigger:
platform: time
at: '19:00:00'
condition:
condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_off_sebastians_air_purifier_in_the_morning_or_aqi
alias: "Turn off Sebastian's Air Purifier in the morning or from AQI"
initial_state: 'true'
trigger:
- platform: time
at: '8:00:00'
- platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
below: 65
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_on_sebastians_air_purifier_if_air_is_bad_for_naptime
alias: "Turn on Sebastian's Air Purifier if the air is bad for naptime"
initial_state: 'true'
trigger:
platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
condition:
condition: time
after: '12:30:00'
before: '16:30:00'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_on_sebastians_air_purifier_if_air_is_bad_for_naptime_2
alias: "Turn on Sebastian's Air Purifier if the air is bad for naptime 2"
initial_state: 'true'
trigger:
platform: time
at: '12:30:00'
condition:
condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: turn_off_sebastians_air_purifier_after_nap
alias: "Turn off Sebastian's Air Purifier after nap"
initial_state: 'true'
trigger:
platform: time
at: '16:30:00'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sebastians_air_purifier
###### Sophies's Air Purifier Input Boolean ########
- id: turn_on_sophies_air_purifier_from_input_select
alias: "Turn on Sophie's Air Purifier from Input Select"
initial_state: 'true'
trigger:
platform: state
entity_id: input_boolean.sophies_air_purifier
to: 'on'
condition:
condition: state
entity_id: fan.sophies_room_air_purifier
state: 'off'
action:
- service: fan.turn_on
data:
entity_id: fan.sophies_room_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.sophies_room_air_purifier
speed: Silent
- id: turn_on_sophies_air_purifier_from_input_select_after unavailable
alias: "Turn on Sophie's Air Purifier from Input Select after Unavailable"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sophies_room_air_purifier
from: 'unavailable'
to: 'off'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sophies_air_purifier
state: 'on'
- condition: template
value_template: "{{ (as_timestamp(now())-as_timestamp(states.input_boolean.sophies_air_purifier.last_changed)) < 600 }}"
action:
- service: fan.turn_on
data:
entity_id: fan.sophies_room_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.sophies_room_air_purifier
speed: Silent
- id: turn_off_sophies_air_purifier_from_input_select
alias: "Turn off Sophie's Air Purifier from Input Select"
initial_state: 'true'
trigger:
platform: state
entity_id: input_boolean.sophies_air_purifier
to: 'off'
condition:
condition: state
entity_id: fan.sophies_room_air_purifier
state: 'on'
action:
service: fan.turn_off
data:
entity_id: fan.sophies_room_air_purifier
- id: turn_off_sophies_air_purifier_from_input_select_after unavailable
alias: "Turn off Sophie's Air Purifier from Input Select after Unavailable"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sophies_room_air_purifier
from: 'unavailable'
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sophies_air_purifier
state: 'off'
- condition: template
value_template: "{{ (as_timestamp(now())-as_timestamp(states.input_boolean.sophies_air_purifier.last_changed)) < 600 }}"
action:
service: fan.turn_off
data:
entity_id: fan.sophies_room_air_purifier
- id: sync_sophie_air_purifier_input_boolean_to_manual_on
alias: "Sync Sophie Air Purifier Input Boolean to Manually Turning Air Purifier On"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sophies_room_air_purifier
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sophies_air_purifier
state: 'off'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sophies_air_purifier
- id: sync_sophie_air_purifier_input_boolean_to_manual_off
alias: "Sync Sophie Air Purifier Input Boolean to Manually Turning Air Purifier Off"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sophies_room_air_purifier
to: 'off'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sophies_air_purifier
state: 'on'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sophies_air_purifier
###### Sebastian's Air Purifier Input Boolean ########
- id: turn_on_sebastians_air_purifier_from_input_select
alias: "Turn on Sebastian's Air Purifier from Input Select"
initial_state: 'true'
trigger:
platform: state
entity_id: input_boolean.sebastians_air_purifier
to: 'on'
condition:
condition: state
entity_id: fan.sebastians_room_air_purifier
state: 'off'
action:
- service: fan.turn_on
data:
entity_id: fan.sebastians_room_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.sebastians_room_air_purifier
speed: Silent
- id: turn_on_sebastians_air_purifier_from_input_select_after unavailable
alias: "Turn on sebastian's Air Purifier from Input Select after Unavailable"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sebastians_room_air_purifier
from: 'unavailable'
to: 'off'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sebastians_air_purifier
state: 'on'
- condition: template
value_template: "{{ (as_timestamp(now())-as_timestamp(states.input_boolean.sebastians_air_purifier.last_changed)) < 600 }}"
action:
- service: fan.turn_on
data:
entity_id: fan.sebastians_room_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.sebastians_room_air_purifier
speed: Silent
- id: turn_off_sebastians_air_purifier_from_input_select
alias: "Turn off sebastian's Air Purifier from Input Select"
initial_state: 'true'
trigger:
platform: state
entity_id: input_boolean.sebastians_air_purifier
to: 'off'
condition:
condition: state
entity_id: fan.sebastians_room_air_purifier
state: 'on'
action:
service: fan.turn_off
data:
entity_id: fan.sebastians_room_air_purifier
- id: turn_off_sebastians_air_purifier_from_input_select_after unavailable
alias: "Turn off sebastian's Air Purifier from Input Select after Unavailable"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sebastians_room_air_purifier
from: 'unavailable'
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sebastians_air_purifier
state: 'off'
- condition: template
value_template: "{{ (as_timestamp(now())-as_timestamp(states.input_boolean.sebastians_air_purifier.last_changed)) < 600 }}"
action:
service: fan.turn_off
data:
entity_id: fan.sebastians_room_air_purifier
- id: sync_sebastian_air_purifier_input_boolean_to_manual_on
alias: "Sync sebastian Air Purifier Input Boolean to Manually Turning Air Purifier On"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sebastians_room_air_purifier
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.sebastians_air_purifier
state: 'off'
action:
service: input_boolean.turn_on
data:
entity_id: input_boolean.sebastians_air_purifier
- id: sync_sebastian_air_purifier_input_boolean_to_manual_off
alias: "Sync sebastian Air Purifier Input Boolean to Manually Turning Air Purifier Off"
initial_state: 'true'
trigger:
platform: state
entity_id: fan.sebastians_room_air_purifier
to: 'off'
condition:
condition: state
entity_id: input_boolean.sebastians_air_purifier
state: 'on'
action:
service: input_boolean.turn_off
data:
entity_id: input_boolean.sebastians_air_purifier
############ BEDROOM AIR PURIFIER ON OFF ##############
- id: turn_on_master_bedroom_air_purifier_if_air_is_bad_at_night
alias: "Turn on Master Bedroom Air Purifier if the air is bad at night"
initial_state: 'true'
trigger:
platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
condition:
condition: time
after: '21:00:00'
before: '11:00:00'
action:
- service: fan.turn_on
data:
entity_id: fan.master_bedroom_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.master_bedroom_air_purifier
speed: Silent
- id: turn_on_master_bedroom_air_purifier_if_air_is_bad_at_night_2
alias: "Turn on Master Bedroom Air Purifier if the air is bad at night 2"
initial_state: 'true'
trigger:
platform: time
at: '21:00:00'
condition:
condition: numeric_state
entity_id: sensor.hlubocepy_air_quality
above: 70
action:
- service: fan.turn_on
data:
entity_id: fan.master_bedroom_air_purifier
- delay:
seconds: 15
- service: fan.set_speed
data:
entity_id: fan.master_bedroom_air_purifier
speed: Silent
- id: turn_off_master_bedroom_air_purifier_in_the_morning_or_aqi
alias: "Turn off Master Bedroom Air Purifier in the morning or from AQI"
initial_state: 'true'
trigger:
- platform: time
at: '11:00:00'
- platform: numeric_state
entity_id: sensor.hlubocepy_air_quality
below: 65
action:
service: fan.turn_off
data:
entity_id: fan.master_bedroom_air_purifier
- id: turn_on_master_bedroom_air_purifier_if_air_is_bad_after_unavailable
alias: "Turn on Master Bedroom Air Purifier if the air is bad after unavailable"

246
automations/christmas_automations.yaml

@ -0,0 +1,246 @@
- id: christmas_tree_toggle
alias: christmas_tree_toggle
initial_state: 'false'
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.fibaro_button_white
scene_data: 7680
scene_id: 1
action:
- service: switch.toggle
data:
entity_id: switch.miele_dishwasher_switch
- id: christmas_mode_button
alias: christmas_mode_button
initial_state: 'false'
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.fibaro_button_white
scene_data: 7800
scene_id: 1
condition:
condition: template
value_template: "{{ now().strftime('%F') <= (now().strftime('%Y') | int ) ~ '-12-31' and now().strftime('%F') > (now().strftime('%Y') | int ) ~ '-12-24' }}"
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.christmas_mode
state: 'off'
sequence:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.itunes_shuffle
- service: switch.turn_on
data:
entity_id: switch.miele_dishwasher_switch
- service: media_player.play_media
data:
entity_id: media_player.chromecast
media_content_type: cast
media_content_id: '
{
"app_name": "youtube",
"media_id": "8WBThkkpnaA"
}'
- event: ALEXA_LAUNCH_ITUNES_PLAYLIST
event_data_template:
alexa_entity: "christmas"
playlist: "christmas"
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 6
- service: dreamscreen.set_brightness
data:
entity_id: dreamscreen.living_room_tv
brightness: 90
- service: remote.turn_on
entity_id: remote.harmony
data:
activity: "Chrome Cast"
- service: remote.send_command
data:
entity_id: remote.harmony
command:
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
device: "Sony TV"
delay_secs: 0.0
- service: input_boolean.turn_on
data:
entity_id: input_boolean.christmas_mode
- conditions:
- condition: state
entity_id: input_boolean.christmas_mode
state: 'on'
sequence:
- service: media_player.media_pause
data:
entity_id: media_player.itunes
- service: switch.turn_off
data:
entity_id: switch.miele_dishwasher_switch
- service: dreamscreen.set_brightness
data:
entity_id: dreamscreen.living_room_tv
brightness: 42
- service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 1
- service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 0
- service: remote.turn_off
data:
entity_id: remote.harmony
- service: media_player.turn_off
data:
entity_id: media_player.chromecast
- service: input_boolean.turn_off
data:
entity_id: input_boolean.christmas_mode
- id: christmas_day_automation
alias: christmas_day_automation
initial_state: 'false'
mode: single
trigger:
platform: state
entity_id: binary_sensor.play_room_zone_3
to: 'on'
condition:
- condition: and
conditions:
- condition: template
value_template: "{{ now().strftime('%F') < (now().strftime('%Y') | int ) ~ '-12-25' and now().strftime('%F') >= (now().strftime('%Y') | int ) ~ '-12-24' }}"
- condition: time
after: '06:00:00'
before: '11:00:00'
action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.christmas_mode
state: 'off'
sequence:
- service: input_boolean.turn_off
data:
entity_id: input_boolean.itunes_shuffle
- service: switch.turn_on
data:
entity_id: switch.miele_dishwasher_switch
- service: media_player.play_media
data:
entity_id: media_player.chromecast
media_content_type: cast
media_content_id: '
{
"app_name": "youtube",
"media_id": "8WBThkkpnaA"
}'
- event: ALEXA_LAUNCH_ITUNES_PLAYLIST
event_data_template:
alexa_entity: "christmas"
playlist: "christmas-sorted"
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 6
- service: dreamscreen.set_brightness
data:
entity_id: dreamscreen.living_room_tv
brightness: 90
- service: remote.turn_on
entity_id: remote.harmony
data:
activity: "Chrome Cast"
- service: remote.send_command
data:
entity_id: remote.harmony
command:
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
- VolumeDown
device: "Sony TV"
delay_secs: 0.0
- service: input_boolean.turn_on
data:
entity_id: input_boolean.christmas_mode
- delay:
hours: 18

2
automations/climate_automations.yaml

@ -240,6 +240,8 @@
platform: state
entity_id: binary_sensor.ecolink_garage_door
to: 'on'
for:
minutes: 1
action:
service: evohome.set_zone_override
data:

388
automations/dreamscreen_automations.yaml

@ -0,0 +1,388 @@
- id: switch_dreamscreen_to_xbox_input_2
alias: switch_dreamscreen_to_xbox_input_2
initial_state: 'true'
trigger:
platform: state
entity_id: remote.harmony
attribute: current_activity
to: "Play Xbox"
action:
- service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 1
- service: dreamscreen.set_hdmi_source
data:
entity_id: dreamscreen.living_room_tv
source: 1
- service: dreamscreen.set_brightness
data:
entity_id: dreamscreen.living_room_tv
brightness: 42
- id: switch_dreamscreen_to_hdmi_switch_input_1
alias: switch_dreamscreen_to_hdmi_switch_input_1
initial_state: 'true'
trigger:
- platform: state
entity_id: remote.harmony
attribute: current_activity
to: "Watch English TV"
- platform: state
entity_id: remote.harmony
attribute: current_activity
to: "Watch Apple TV"
- platform: state
entity_id: remote.harmony
attribute: current_activity
to: "Go to My Mac"
- platform: state
entity_id: remote.harmony
attribute: current_activity
to: "Chrome Cast"
- platform: state
entity_id: remote.harmony
attribute: current_activity
to: "Play Nintendo"
action:
service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 0
# action:
# service: dreamscreen.set_hdmi_source
# data:
# entity_id: dreamscreen.living_room_tv
# source: 0
- id: switch_dreamscreen_off
alias: switch_dreamscreen_off
initial_state: 'true'
trigger:
- platform: state
entity_id: remote.harmony
attribute: current_activity
to: "Watch Russian TV"
- platform: state
entity_id: remote.harmony
attribute: current_activity
to: "Watch Czech TV"
- platform: state
entity_id: remote.harmony
to: 'off'
action:
service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 0
- id: switch_dreamscreen_mode
alias: switch_dreamscreen_mode
initial_state: 'true'
trigger:
- platform: state
entity_id: input_select.dreamscreen_mode
action:
- choose:
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_mode'
state: 'Turn Off'
sequence:
- service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 0
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_mode'
state: 'Video'
sequence:
- service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 1
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_mode'
state: 'Music'
sequence:
- service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 2
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_mode'
state: 'Ambient'
sequence:
- service: dreamscreen.set_mode
data:
entity_id: dreamscreen.living_room_tv
mode: 3
- id: sync_dreamscreen_mode
alias: sync_dreamscreen_mode
initial_state: 'true'
trigger:
- platform: state
entity_id: dreamscreen.living_room_tv
action:
- choose:
- conditions:
- condition: state
entity_id: dreamscreen.living_room_tv
attribute: device_mode
state: '0'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.dreamscreen_mode
option: 'Turn Off'
- conditions:
- condition: state
entity_id: dreamscreen.living_room_tv
attribute: device_mode
state: '1'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.dreamscreen_mode
option: 'Video'
- conditions:
- condition: state
entity_id: dreamscreen.living_room_tv
attribute: device_mode
state: '2'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.dreamscreen_mode
option: 'Music'
- conditions:
- condition: state
entity_id: dreamscreen.living_room_tv
attribute: device_mode
state: '3'
sequence:
- service: input_select.select_option
data:
entity_id: input_select.dreamscreen_mode
option: 'Ambient'
- id: set_dreamscreen_brightness
alias: set_dreamscreen_brightness
initial_state: 'true'
trigger:
- platform: state
entity_id: input_number.dreamscreen_brightness
action:
- service: dreamscreen.set_brightness
data:
entity_id: dreamscreen.living_room_tv
brightness: >
{{ states('input_number.dreamscreen_brightness')|int}}
- id: sync_dreamscreen_brightness
alias: sync_dreamscreen_brightness
initial_state: 'true'
trigger:
- platform: state
entity_id: dreamscreen.living_room_tv
action:
- service: input_number.set_value
data:
entity_id: input_number.dreamscreen_brightness
value: >
{{ state_attr('dreamscreen.living_room_tv', 'brightness')|int }}
- id: switch_dreamscreen_visualization
alias: switch_dreamscreen_visualization
initial_state: 'true'
trigger:
- platform: state
entity_id: input_select.dreamscreen_scene
action:
- choose:
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Random'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 0
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Fire'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 1
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Twinkle'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 2
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Ocean'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 3
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Pride'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 4
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Fireworks'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 5
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Holiday'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 6
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Pop'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 7
- conditions:
- condition: state
entity_id: 'input_select.dreamscreen_scene'
state: 'Forest'
sequence:
- service: dreamscreen.set_ambient_scene
data:
entity_id: dreamscreen.living_room_tv
scene: 8