homeassistant/automations.yaml

991 lines
23 KiB
YAML
Raw Normal View History

2025-01-10 21:08:35 -08:00
- id: '1635483467418'
alias: Sunrise
description: Automation to run at sunrise
trigger:
- platform: sun
event: sunrise
condition: []
action:
- scene: scene.sunrise
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.night_time
mode: single
- id: '1635483876968'
alias: Sunset Halloween
description: Sunset Automation for Halloween
trigger:
- platform: sun
event: sunset
condition:
- condition: template
value_template: '{{now().month == 10}}'
action:
- scene: scene.halloween
mode: single
- id: '1635484202281'
alias: Sunset
description: General Sunset Automation
trigger:
- platform: sun
event: sunset
condition:
- condition: template
value_template: '{{now().month != 10}}'
action:
- scene: scene.outside_night
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.night_time
mode: single
- id: '1635486054206'
alias: Vacation Lights
description: Automated Light toggles when on vacation
trigger:
- platform: time_pattern
minutes: /42
condition:
- condition: state
entity_id: input_boolean.vacation
state: 'true'
- condition: time
after: 09:00:00
before: '23:59:00'
action:
- type: toggle
device_id: ab479de2dd87431f4df8be5664738cb5
entity_id: light.master_bedroom_1
domain: light
- type: toggle
device_id: f7db009b6fc9d49bdcd871b89843c3ce
entity_id: light.master_bedroom_2
domain: light
mode: single
- id: '1635486181784'
alias: Vacation Lights Out
description: ''
trigger:
- platform: time
at: 00:00:00
condition:
- condition: state
entity_id: input_boolean.vacation
state: 'true'
action:
- type: turn_off
device_id: ab479de2dd87431f4df8be5664738cb5
entity_id: light.master_bedroom_1
domain: light
- type: turn_off
device_id: f7db009b6fc9d49bdcd871b89843c3ce
entity_id: light.master_bedroom_2
domain: light
mode: single
- id: '1638691834777'
alias: Sunset Christmas
description: Sunset Automation for Christmas
trigger:
- platform: sun
event: sunset
offset: '0'
condition:
- condition: template
value_template: '{{now().month == 12}}'
action:
- scene: scene.christmas
mode: single
- id: '1638692135758'
alias: Christmas Lights Off
description: Turn off Christmas Lights
trigger:
- platform: sun
event: sunrise
offset: '0'
condition:
- condition: template
value_template: '{{now().month == 12}}'
action:
- type: turn_off
device_id: 26a7c21d8e33cd899389624a1fe3e2d5
entity_id: switch.christmas_tree
domain: switch
- type: turn_off
device_id: 9bccaa73d9e1834dbd51913aed9dff42
entity_id: switch.outdoor_outlet_1
domain: switch
- type: turn_off
device_id: 9bccaa73d9e1834dbd51913aed9dff42
entity_id: switch.outdoor_outlet_0
domain: switch
mode: single
- id: '1638943365790'
alias: Wall Switch Lab On
description: Control LED Strips with Wall Switch
trigger:
- platform: event
event_type: state_changed
event_data:
entity_id: light.new_office_main
context:
user_id:
id: office_light_switch
condition:
- condition: and
conditions:
- condition: state
entity_id: light.new_office_main
state: 'on'
action:
- service: light.turn_on
data:
brightness: '{{ state_attr(''light.new_office_main'', ''brightness'')|int }}'
target:
entity_id: light.corner_desk_light
- service: light.turn_on
data:
brightness: '{{ state_attr(''light.new_office_main'', ''brightness'')|int }}'
target:
entity_id: light.office_desk_light
- service: light.turn_on
data:
brightness: '{{ state_attr(''light.new_office_main'', ''brightness'')|int }}'
target:
entity_id: light.office_pegboard_light
mode: single
- id: '1641448732956'
alias: Notify Roomba Full
description: Roomba bin is full
trigger:
- type: turned_on
platform: device
device_id: a4eb13866d7b6a4879742480c3141ed3
entity_id: binary_sensor.roomba_bin_full
domain: binary_sensor
condition: []
action:
- device_id: 6c4eb365a86b5a274810215f0e7f5206
domain: mobile_app
type: notify
message: Roomba is full!
title: Empty Roomba
mode: single
- id: '1641449501193'
alias: Notify Roomba Stuck
description: Send a notification when Roomba gets stuck
trigger:
- platform: template
value_template: '"{%if is_state_attr(''vacuum.roomba'', ''status'', ''Stuck'')
%}true{%endif%}"'
condition: []
action:
- device_id: 6c4eb365a86b5a274810215f0e7f5206
domain: mobile_app
type: notify
message: Roomba got stuck!
title: Help Roomba
mode: single
- id: '1652037788164'
alias: Wall Switch Study On
description: Control LED Strips with Wall Switch
trigger:
- platform: event
event_type: state_changed
id: study_light_switch
event_data:
entity_id: light.study_main_lights
condition: []
action:
- service: light.turn_on
data:
brightness: '{{ state_attr(''light.study_main_lights'', ''brightness'')|int
}}'
target:
entity_id: light.office_closet_light
mode: single
- id: '1660713427434'
alias: Wall Switch Lab Off
description: ''
trigger:
- platform: event
event_type: state_changed
id: office_light_switch
event_data:
entity_id: light.new_office_main
condition:
- condition: and
conditions:
- condition: state
entity_id: light.new_office_main
state: 'off'
action:
- service: light.turn_off
target:
entity_id: light.corner_desk_light
data: {}
- service: light.turn_off
target:
entity_id: light.office_desk_light
data: {}
- service: light.turn_off
target:
entity_id: light.office_pegboard_light
data: {}
mode: single
- id: '1660714407004'
alias: Wall Switch Study Off
description: ''
trigger:
- platform: event
event_type: state_changed
id: study_light_switch
event_data:
entity_id: light.study_main_lights
condition:
- condition: and
conditions:
- condition: state
entity_id: light.study_main_lights
state: 'off'
action:
- service: light.turn_off
target:
entity_id: light.office_closet_light
mode: single
- id: '1662700912082'
alias: Thermostat Set Heat Morning
description: ''
trigger:
- platform: time
at: 07:45:00
condition:
- condition: or
conditions:
- condition: zone
entity_id: person.daniel
zone: zone.home
- condition: zone
entity_id: person.elly
zone: zone.home
action:
- service: script.set_active_thermostat
data: {}
mode: single
- id: '1662701168502'
alias: Thermostat Set Heat Night
description: ''
trigger:
- platform: time
at: '23:59:00'
condition:
- condition: or
conditions:
- condition: zone
entity_id: device_tracker.mcknight_s21
zone: zone.home
- condition: zone
entity_id: device_tracker.iphone
zone: zone.home
action:
- service: script.set_away_thermostat
data: {}
mode: single
- id: '1662701718116'
alias: Thermostat Set Heat Leaving
description: ''
trigger:
- platform: zone
entity_id: person.daniel
zone: zone.home
event: leave
- platform: zone
entity_id: person.elly
zone: zone.home
event: leave
condition:
- condition: not
conditions:
- condition: zone
entity_id: person.daniel
zone: zone.home
- condition: zone
entity_id: person.elly
zone: zone.home
action:
- service: script.set_away_thermostat
data: {}
mode: single
- id: '1662701848983'
alias: Thermostat Set Heat Arriving
description: ''
trigger:
- platform: zone
entity_id: person.daniel
zone: zone.home
event: enter
- platform: zone
entity_id: person.elly
zone: zone.home
event: enter
condition:
- condition: time
before: '23:59:00'
after: 06:00:00
weekday:
- mon
- wed
- tue
- thu
- fri
- sat
- sun
action:
- service: script.set_active_thermostat
data: {}
mode: single
- id: '1673232767631'
alias: Notify Ender3 Print Completed
description: ''
trigger:
- platform: state
entity_id:
- sensor.ender_3_v2_current_state
from: Printing
to: Operational
condition: []
action:
- service: notify.mobile_app_mcknight_s21
data:
message: Ender3 Print Completed
mode: single
- id: '1681435099601'
alias: Notify Doorbell
description: Send a notification that the front doorbell was pressed
trigger:
- type: turned_on
platform: device
device_id: 7ccb0bf55c8efd4e6a1fd72359855010
entity_id: binary_sensor.front_doorbell_visitor
domain: binary_sensor
- platform: state
entity_id:
- binary_sensor.front_doorbell_person
from: 'off'
to: 'on'
enabled: false
condition: []
action:
- service: camera.snapshot
data:
filename: /tmp/snapshots/doorbell_notification.jpg
target:
entity_id: camera.front_doorbell_sub
- service: notify.notify
data:
message: Someone is at the Front Door
title: Doorbell
data:
image: /media/local/snapshots/doorbell_notification.jpg
actions:
- action: URI
title: View
uri: entityId:camera.front_doorbell_sub
mode: single
- id: '1694318973909'
alias: Wall Switch Bar
description: ''
trigger:
- platform: event
event_type: zha_event
context: {}
event_data:
device_id: 80b0915748ae0d1b75b6ba0cea867230
condition: []
action:
- service: light.turn_on
data:
brightness: '{{ trigger.event.data[''params''][''level''] }}'
target:
device_id: 00b6335ff43b01e794f572fe23eb73af
mode: single
- id: '1694367612109'
alias: Motion Laundry
description: Laundry light motion sensor
use_blueprint:
path: homeassistant/motion_light.yaml
input:
motion_entity: binary_sensor.laundry_motion_sensor_occupancy
light_target:
device_id: 463c07d310e689c88d1e90cb6d0dbf5d
no_motion_wait: 30
- id: '1694388568736'
alias: Adaptive Lighting Main
description: ''
trigger:
- platform: device
type: turned_on
device_id: 68e66b895faa67725401b7887a761ea1
entity_id: cd047d1baf5a1b27dd283b743f14d224
domain: light
- platform: device
type: turned_on
device_id: 68e66b895faa67725401b7887a761ea1
entity_id: a1099f3929f33df1b77e3e7f08619cb7
domain: light
- platform: device
type: turned_on
device_id: 0465503d919b2acc59e4c91a697ba688
entity_id: 1f6915877d028f829ca414041c0c9c85
domain: light
- platform: device
type: turned_on
device_id: 68e66b895faa67725401b7887a761ea1
entity_id: 1522ded33de297420226c525ec9b718c
domain: light
- platform: device
type: turned_on
device_id: 68e66b895faa67725401b7887a761ea1
entity_id: cebc39f2badf2719138453544bd93f37
domain: light
- platform: device
type: turned_on
device_id: 463c07d310e689c88d1e90cb6d0dbf5d
entity_id: 58c451039e6c0fb9540748c06f6d53fd
domain: light
- platform: device
type: turned_on
device_id: b2dbd6048caf7d1da74fb520435e7642
entity_id: 60f11695e841139c29e33cea4d35fde0
domain: light
- platform: device
type: turned_on
device_id: 68e66b895faa67725401b7887a761ea1
entity_id: 1ecdb677984db7914076a0498f6b56e5
domain: light
- platform: device
type: turned_on
device_id: 68e66b895faa67725401b7887a761ea1
entity_id: 30c8122f71ad300406802b740f8409e2
domain: light
condition:
- condition: template
value_template: '{% if trigger["to_state"]["context"]["user_id"] == none %} True
{%else%} False {%endif%}'
- condition: template
value_template: '{% if trigger["id"] == ''0'' %} True {%else%} False {%endif%}'
enabled: false
action:
- service: adaptive_lighting.set_manual_control
data:
manual_control: false
entity_id: switch.adaptive_lighting_main_level
lights:
- '{{ trigger.entity_id }}'
- service: adaptive_lighting.apply
data:
lights:
- '{{ trigger.entity_id }}'
mode: single
- id: '1694481886990'
alias: Adaptive Lighting Bedroom
description: ''
trigger:
- platform: device
type: turned_on
device_id: 68e66b895faa67725401b7887a761ea1
entity_id: 14d3b3b07e6afc51cbf297621e3294b3
domain: light
- platform: device
type: turned_on
device_id: 68e66b895faa67725401b7887a761ea1
entity_id: 238e4a4167b112eafc9b818533b4f84d
domain: light
enabled: false
condition:
- condition: template
value_template: '{% if trigger["to_state"]["context"]["user_id"] == none %} True
{%else%} False {%endif%}'
action:
- service: adaptive_lighting.set_manual_control
data:
manual_control: false
entity_id: switch.adaptive_lighting_bedroom
lights:
- '{{ trigger.entity_id }}'
- service: adaptive_lighting.apply
data:
lights:
- '{{ trigger.entity_id }}'
mode: single
- id: '1694738170877'
alias: Wall Switch Master Bathroom Toggle
description: ''
trigger:
- platform: device
device_id: 144fa8e071d346f6caa9cb4031b49ebd
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '005'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 005
condition: []
action:
- service: light.toggle
data:
transition: 1
target:
entity_id: light.master_bathroom_lights
mode: single
- id: '1694742618791'
alias: Wall Switch Master Bathroom Bright
description: ''
trigger:
- platform: device
device_id: 144fa8e071d346f6caa9cb4031b49ebd
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '001'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 001
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.master_bathroom_bright
metadata: {}
mode: single
- id: '1694743129964'
alias: Wall Switch Master Bathroom Dim
description: ''
trigger:
- platform: device
device_id: 144fa8e071d346f6caa9cb4031b49ebd
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '002'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 002
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.master_bathroom_dim
metadata: {}
mode: single
- id: '1694743162117'
alias: Wall Switch Master Bathroom Night
description: ''
trigger:
- platform: device
device_id: 144fa8e071d346f6caa9cb4031b49ebd
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '003'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 003
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.master_bathroom_night
metadata: {}
mode: single
- id: '1694743209477'
alias: Wall Switch Master Bathroom Off
description: ''
trigger:
- platform: device
device_id: 144fa8e071d346f6caa9cb4031b49ebd
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '004'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 004
condition: []
action:
- service: light.turn_off
data:
transition: 1
target:
entity_id: light.master_bathroom_lights
mode: single
- id: '1694750526549'
alias: Wall Switch Back Yard Dim
description: ''
trigger:
- platform: device
device_id: 4f957786752a5dcc5aadb8d0e75580ae
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '002'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 002
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.back_yard_dim
metadata: {}
mode: single
- id: '1694750614242'
alias: Wall Switch Back Yard Bright
description: ''
trigger:
- platform: device
device_id: 4f957786752a5dcc5aadb8d0e75580ae
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '001'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 001
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.back_yard_bright
metadata: {}
mode: single
- id: '1694750647787'
alias: Wall Switch Back Yard Off
description: ''
trigger:
- platform: device
device_id: 4f957786752a5dcc5aadb8d0e75580ae
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '004'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 004
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.back_yard_off
metadata: {}
mode: single
- id: '1694750676665'
alias: Wall Switch Back Yard Night
description: ''
trigger:
- platform: device
device_id: 4f957786752a5dcc5aadb8d0e75580ae
domain: zwave_js
type: event.value_notification.central_scene
property: scene
property_key: '003'
endpoint: 0
command_class: 91
subtype: Endpoint 0 Scene 003
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.back_yard_night
metadata: {}
mode: single
- id: '1694750963390'
alias: Wall Switch Garage
description: ''
trigger:
- platform: device
type: changed_states
device_id: 90ac4212eec3165938da0845b28f5112
entity_id: 3a58a6cb0116ca7c84aa474843f47076
domain: switch
condition: []
action:
- if:
- condition: device
type: is_on
device_id: 90ac4212eec3165938da0845b28f5112
entity_id: 3a58a6cb0116ca7c84aa474843f47076
domain: switch
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.garage_sink
else:
- service: switch.turn_off
data: {}
target:
entity_id: switch.garage_sink
mode: single
- id: '1694834726137'
alias: Downstairs Movie Time Start
description: ''
trigger:
- platform: state
entity_id:
- scene.movie
condition:
- condition: state
entity_id: media_player.tv_downstairs
state: 'on'
action:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.movie_time
mode: single
- id: '1694834841579'
alias: Downstairs Movie Time End
description: ''
trigger:
- platform: state
entity_id:
- media_player.tv_downstairs
to: 'off'
condition: []
action:
- if:
- condition: state
entity_id: input_boolean.movie_time
state: 'on'
then:
- service: scene.turn_on
target:
entity_id: scene.paused
metadata: {}
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.movie_time
mode: single
- id: '1694835059358'
alias: Downstairs Movie Time Paused
description: ''
trigger:
- platform: state
entity_id:
- media_player.tv_downstairs
to:
from: playing
- platform: state
entity_id:
- media_player.cast_downstairs
to: paused
- platform: state
entity_id:
- media_player.cast_downstairs
to: idle
from: playing
condition:
- condition: state
entity_id: input_boolean.movie_time
state: 'on'
action:
- service: scene.turn_on
target:
entity_id: scene.paused
metadata: {}
mode: single
- id: '1694835118662'
alias: Downstairs Movie Time Resume
description: ''
trigger:
- platform: state
entity_id:
- media_player.tv_downstairs
to: playing
- platform: state
entity_id:
- media_player.cast_downstairs
to: playing
condition:
- condition: state
entity_id: input_boolean.movie_time
state: 'on'
action:
- service: scene.turn_on
target:
entity_id: scene.movie
metadata: {}
mode: single
- id: '1694840211061'
alias: Night Visitor
description: ''
triggers:
- type: turned_on
device_id: 7ccb0bf55c8efd4e6a1fd72359855010
entity_id: 48a522e79556961a32aa77a2ddc3f00e
domain: binary_sensor
trigger: device
conditions:
- condition: state
entity_id: input_boolean.night_time
state: 'on'
actions:
- data:
transition: 1
brightness_step_pct: 50
target:
entity_id: light.signify_netherlands_b_v_lct011_light
enabled: true
action: light.turn_on
- if:
- condition: and
conditions:
- condition: state
entity_id: person.daniel
state: home
- condition: state
entity_id: person.elly
state: home
then:
- data:
skip_condition: true
target:
entity_id: automation.notify_doorbell
action: automation.trigger
enabled: false
- wait_for_trigger:
- type: turned_off
device_id: 7ccb0bf55c8efd4e6a1fd72359855010
entity_id: 48a522e79556961a32aa77a2ddc3f00e
domain: binary_sensor
trigger: device
for:
hours: 0
minutes: 1
seconds: 0
- data:
transition: 1
brightness_step_pct: -50
target:
entity_id: light.signify_netherlands_b_v_lct011_light
enabled: true
action: light.turn_on
mode: single
- id: '1695443980308'
alias: Water Back Lawn
description: Water the back lawn until it is done
trigger:
- platform: device
type: turned_on
device_id: a34b60a472120b07383ca0919ea5e0f3
entity_id: 9f1043ce914a765a25609e5f6b2c01e0
domain: switch
id: manual
- platform: sun
event: sunrise
id: scheculed
condition:
- condition: or
conditions:
- condition: trigger
id:
- manual
- condition: and
conditions:
- condition: trigger
id:
- scheculed
- condition: numeric_state
entity_id: sensor.backyard_moisture_soil_moisture
below: 30
- condition: numeric_state
entity_id: sensor.backyard_moisture_temperature
above: 40
- condition: time
weekday:
- tue
- thu
- sun
action:
- service: script.water_back_lawn
data: {}
- service: notify.notify
data:
message: The back lawn has been watered
title: Watering Complete
mode: single
- id: '1695572719870'
alias: Wake Up
description: ''
trigger:
- platform: time
at: input_datetime.wake_up
condition:
- condition: or
conditions:
- condition: state
entity_id: person.daniel
state: home
- condition: state
entity_id: person.elly
state: home
action:
- service: script.wake_up
data: {}
mode: single
- id: '1695601142252'
alias: Notify Front Door Open
description: Notify if the front door has been left open
trigger:
- platform: state
entity_id:
- binary_sensor.front_door_open
to: 'on'
for:
hours: 0
minutes: 10
seconds: 0
condition: []
action:
- service: notify.notify
data:
message: The front door has been open for 10 minutes
title: Front Door Open
mode: single
- id: '1696093159369'
alias: Notify Batteries Backyard
description: ''
trigger:
- type: battery_level
platform: device
device_id: fa11693b0a010609e10b2608bf075c08
entity_id: 7c62dc04e553d560facba902d9137b41
domain: sensor
below: 20
condition: []
action:
- service: notify.notify
data:
message: Change the batteries
title: Backyard Moisture Sensor
mode: single
- id: '1718321382050'
alias: Dusto collector switch
description: ''
trigger:
- device_id: eb7f250032b1e1ad4d4fc75c933328e7
domain: zha
platform: device
type: remote_button_short_press
subtype: button
condition: []
action:
- type: toggle
device_id: 0565d0b49105ce8b56500a070c6ae5ab
entity_id: a814bce92cdb48a6b2127c4a4e6798e7
domain: switch
mode: single