Files
homeassistant/automations.yaml
2021-10-23 15:47:31 -04:00

353 lines
8.7 KiB
YAML

- id: '1632537684866'
alias: Appliance has finished
description: ''
use_blueprint:
path: sbyx/notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml
input:
starting_threshold: 10
actions:
- service: notify.mobile_app_mikephone
data:
message: Wash cycle is now complete!
- service: notify.mobile_app_pixel_4a
data:
message: Wash cycle is not complete!
- service: tts.cloud_say
data:
entity_id: media_player.livingroom_speaker
message: The wash cycle is now complete
- condition: state
entity_id: media_player.bedroom_tv_chromecast
state: playing
- service: notify.bedroomtv
data:
message: The wash cycle is now complete!
power_sensor: sensor.smart_plug_4_power
finishing_hysteresis: 3
finishing_threshold: 5
- id: '1632538769085'
alias: Advanced medication reminder
description: ''
use_blueprint:
path: Aohzan/medication_reminder.yaml
input:
logbook_message_no_answer: No answer time out
notify_device: 187ba06bd5d1900fdf6df867d13009d0
input_boolean: input_boolean.notify_medication
reminder_time: '21:00:00'
optional_action: []
- id: '1632791004969'
alias: Notify medication taken
description: ''
trigger:
- platform: state
entity_id: input_boolean.notify_medication
to: 'on'
condition: []
action:
- service: notify.mobile_app_pixel_4a
data:
title: Medication Taken
message: Mike has taken his pill.
mode: single
- id: '1632928476836'
alias: Sleep Timer
description: ''
trigger:
- platform: event
event_type: timer.started
event_data:
entity_id: timer.sleep_timer
condition: []
action:
- service: homeassistant.turn_off
target:
entity_id: group.basement_lights
- service: homeassistant.turn_off
target:
entity_id:
- light.bedroom_lamp_left
- switch.bedroom_lamp_right
- service: media_player.play_media
data:
media_content_id: /media/whitenoisefan.m4a
media_content_type: music
target:
entity_id: media_player.squeezebox_radio
- service: light.turn_off
target:
entity_id: light.upstairs_light
data:
transition: 10
- type: turn_off
device_id: 451b184dee654bf08731024d01b4b602
entity_id: light.porch_light
domain: light
- service: input_boolean.turn_on
target:
entity_id: input_boolean.night_mode
- service: notify.mobile_app_mikephone
data:
message: command_dnd
title: priority_only
- wait_for_trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.sleep_timer
- service: media_player.turn_off
target:
entity_id: media_player.lg_tv_remote
mode: restart
- id: '1632963978970'
alias: Bedroom lamp on at sunset
description: ''
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
below: '5'
condition:
- condition: or
conditions:
- condition: state
entity_id: device_tracker.mike
state: home
- condition: state
entity_id: device_tracker.jen
state: home
action:
- type: turn_on
device_id: 4850dbfbf153e58dd801ca200dcd79d6
entity_id: light.bedroom_lamp_left
domain: light
brightness_pct: 45
- service: homeassistant.turn_on
target:
entity_id: switch.bedroom_lamp_right
mode: single
- id: '1633200241746'
alias: Office Button Presses
description: ''
use_blueprint:
path: carlosmesquita/zha-xiaomi-aqara-wireless-mini-switch-wxkg11lm-lumi-sensor-switch-aq2.yaml
input:
mijia_square_switch: bba097c41e6eb679f95f92dbc7ec061e
remote_button_short_press:
- service: homeassistant.toggle
target:
entity_id: group.office_lights
remote_button_double_press:
- service: homeassistant.toggle
target:
entity_id: script.leaving_office
- id: '1633210997896'
alias: Bedroom Button Presses
description: ''
use_blueprint:
path: SeanM/zha-aqara-wireless-mini-switch.yaml
input:
aqara_mini_switch: 87be5578c5cfe9927a72a2d438b5fe9a
button_single_press:
- service: homeassistant.toggle
target:
entity_id: light.bedroom_lamp_left
button_long_press:
- service: timer.start
data:
duration: '0'
target:
entity_id: timer.sleep_timer
button_double_press:
- service: homeassistant.toggle
target:
entity_id: switch.bedroom_lamp_right
- id: '1633312071688'
alias: Shaedyn's Bedtime Countdown
description: ''
trigger:
- platform: time
at: '21:15:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- sun
- condition: state
entity_id: input_boolean.bedtime_override
state: 'off'
action:
- service: tts.cloud_say
data:
entity_id: media_player.livingroom_speaker
message: You have 15 minutes until bedtime.
- service: notify.shield
data:
message: 15 minutes till bed!
- wait_for_trigger:
- platform: time
at: '21:29:00'
continue_on_timeout: true
- service: tts.cloud_say
data:
entity_id: media_player.livingroom_speaker
message: Its time for bed! Devices will shut down in one minute.
- wait_for_trigger:
- platform: time
at: '21:30:00'
- condition: state
state: 'off'
entity_id: input_boolean.bedtime_override
- service: homeassistant.toggle
target:
entity_id: switch.livingroompc_sleep
- service: homeassistant.turn_off
target:
entity_id: remote.harmony_hub
- service: light.turn_on
target:
entity_id: light.upstairs_light
data:
transition: 5
brightness_pct: 75
mode: single
- id: '1633312401037'
alias: Turn off Bedtime Override Boolean at midnight
description: ''
trigger:
- platform: time
at: 00:00:00
condition:
- condition: state
entity_id: input_boolean.bedtime_override
state: 'on'
action:
- service: homeassistant.turn_off
target:
entity_id: input_boolean.bedtime_override
mode: single
- id: '1633555833474'
alias: Upstairs light on at sunset
description: ''
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
below: '10'
condition: []
action:
- service: light.turn_on
target:
entity_id: light.upstairs_light
data:
brightness_pct: 15
mode: single
- id: '1633561149527'
alias: Porch light on at night
description: ''
trigger:
- platform: numeric_state
entity_id: sun.sun
below: '-1'
attribute: elevation
condition: []
action:
- service: light.turn_on
target:
entity_id: light.porch_light
mode: single
- id: '1633576069502'
alias: Upstairs light bright when shae's door opens
description: ''
trigger:
- platform: state
entity_id: binary_sensor.shaedyns_door
to: 'on'
condition:
- condition: state
entity_id: input_boolean.night_mode
state: 'on'
action:
- service: light.turn_on
data:
transition: 30
brightness_pct: 75
target:
entity_id: light.upstairs_light
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.shaedyns_door
to: 'off'
for:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: light.turn_off
target:
entity_id: light.upstairs_light
mode: single
- id: '1633748728761'
alias: Turn off night mode boolen
description: ''
trigger:
- platform: state
entity_id: remote.harmony_hub
to: 'on'
condition:
- condition: time
after: 06:30:00
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.night_mode
mode: single
- id: '1634785924008'
alias: Morning wake up routine
description: ''
trigger:
- platform: template
value_template: '{{now().strftime("%a %h %d %H:%M %Z %Y") == (((state_attr(''sensor.pixel_4a_next_alarm'',
''Time in Milliseconds'') | int / 1000) + 1*60 ) | timestamp_custom(''%a %h
%d %H:%M %Z %Y''))}}
'
condition:
- condition: state
entity_id: person.jen
state: home
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
before: 07:00:00
after: 06:00:00
action:
- service: script.turn_on
target:
entity_id: script.morning_routine
- service: input_boolean.turn_off
target:
entity_id: input_boolean.night_mode
mode: single
- id: '1634835663224'
alias: Morning lights turn off
description: ''
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
above: '1'
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.morning_lights_2
mode: single