homeassistant-config/automations.yaml

227 lines
5.9 KiB
YAML
Executable File

- id: '1627952406585'
alias: Turn off the lab lights when Joe is away.
description: ''
trigger:
- platform: zone
entity_id: person.joe
zone: zone.home
event: leave
condition: []
action:
- type: turn_off
device_id: d03b2a6c6faf5921d77b4145ffe3afa8
entity_id: switch.lab_lights
domain: switch
mode: single
- id: '1627952464320'
alias: Activate lab when Joe arrives.
description: ''
trigger:
- platform: zone
entity_id: person.joe
zone: zone.home
event: enter
condition: []
action:
- type: turn_on
device_id: d03b2a6c6faf5921d77b4145ffe3afa8
entity_id: switch.lab_lights
domain: switch
- service: wake_on_lan.send_magic_packet
data:
mac: 0c:9d:92:8a:3d:21
mode: single
- id: '1627953076015'
alias: Turn on lab lights after sunset if Joe is home.
description: ''
trigger:
- platform: sun
event: sunset
offset: -02:00:00
condition:
- condition: zone
entity_id: person.joe
zone: zone.home
action:
- type: turn_on
device_id: d03b2a6c6faf5921d77b4145ffe3afa8
entity_id: switch.lab_lights
domain: switch
mode: single
- id: '1627954003317'
alias: Setup media viewing when chromecast is in use
description: Turns off/dims the bedroom lights, dims the projector, etc etc
trigger:
- platform: device
device_id: f6097a01c7e3e31bb394018e6a8be3e7
domain: media_player
entity_id: media_player.joe_s_lab
type: idle
- platform: device
device_id: f6097a01c7e3e31bb394018e6a8be3e7
domain: media_player
entity_id: media_player.joe_s_lab
type: turned_on
- platform: device
device_id: f6097a01c7e3e31bb394018e6a8be3e7
domain: media_player
entity_id: media_player.joe_s_lab
type: playing
condition: []
action:
- type: turn_off
device_id: d03b2a6c6faf5921d77b4145ffe3afa8
entity_id: switch.lab_lights
domain: switch
- service: media_player.turn_on
target:
entity_id: media_player.lab_projector
mode: single
- id: '1628264103743'
alias: Send welcome home message when Joe arrives home.
description: ''
trigger:
- platform: zone
entity_id: person.joe
zone: zone.home
event: enter
condition: []
action:
- service: notify.lab_discord
data:
message: Welcome home <@185206201011798016>
target:
- '505468673754923049'
mode: single
- id: '1628291074276'
alias: Activate Empty House Scene when house is empty
description: When everybody leaves, turn off the lights (switches only)
trigger:
- platform: state
entity_id: binary_sensor.people_home
to: 'off'
condition: []
action:
- scene: scene.empty_house
mode: single
- id: '1628359480237'
alias: Turn Off Downstairs Lights on Time Schedule
description: Just turn off lights we can assume without sensors wont be in use at
these hours
trigger:
- platform: time
at: 03:00
condition: []
action:
- service: homeassistant.turn_off
target:
entity_id: group.basement
mode: single
- id: '1628534795820'
alias: Activate Basement Lights on Shop Door Entry
description: ''
trigger:
- platform: state
entity_id: binary_sensor.shop_door_sensor
to: 'on'
condition: []
action:
- service: homeassistant.turn_on
target:
entity_id: group.basement
mode: single
- id: '1628551010045'
alias: Cascade Turn Off Basement Lights
description: 'If somebody turns off the lights at the stairwell, they prolly dont
mind if all the lights beyond that are turned off too.
will not turn off lights if the rear door is ajar'
trigger:
- platform: state
entity_id: switch.shop_lights
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.shop_door_sensor
state: 'off'
action:
- service: homeassistant.turn_off
target:
entity_id: group.basement_lights
mode: single
- id: '1628966608945'
alias: Reactivate Basemnt footpath lights if door is propped
description: Checks if the basement door is propped whenever somebody tries to disable
the lights, and, if it is, reactivates all the lights
trigger:
- platform: state
entity_id: switch.shop_lights
to: 'off'
from: 'on'
condition:
- condition: state
entity_id: binary_sensor.shop_door_sensor
state: 'on'
action:
- service: homeassistant.turn_on
target:
entity_id: group.basement_lights
mode: single
- id: '1629133005916'
alias: Turn off lab projector when lab chromecast is off
description: No need to run the projector when the chromecast is off
trigger:
- platform: device
device_id: f6097a01c7e3e31bb394018e6a8be3e7
domain: media_player
entity_id: media_player.joe_s_lab
type: turned_off
for:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
condition: []
action:
- service: media_player.turn_off
target:
entity_id: media_player.lab_projector
mode: single
- id: '1629335199149'
alias: Dim the lights when living room tv is activated
description: Enters the light mode living room cinema scene IF the lights are on.
trigger:
- platform: state
entity_id: media_player.samsungtv_2570afd6_0816_491c_99e1_43252512efe3
to: 'on'
condition:
- condition: device
type: is_on
device_id: f4fa8528d77b7dca7c7f5c1fe6fcf7a8
entity_id: light.living_room_lights
domain: light
action:
- scene: scene.living_room_cinema_scene
mode: single
- id: '1629567624901'
alias: Reactivate lights when Living Room TV is stopped
description: ''
trigger:
- platform: state
entity_id: media_player.samsungtv_2570afd6_0816_491c_99e1_43252512efe3
to: 'off'
condition:
- condition: device
type: is_on
device_id: f4fa8528d77b7dca7c7f5c1fe6fcf7a8
entity_id: light.living_room_lights
domain: light
action:
- type: turn_on
device_id: f4fa8528d77b7dca7c7f5c1fe6fcf7a8
entity_id: light.living_room_lights
domain: light
brightness_pct: 100
mode: single