334 lines
8.0 KiB
YAML
334 lines
8.0 KiB
YAML
- alias: 'Server Rack: Overheating'
|
|
description: Actions that should be taken when temperature inside the server rack
|
|
exceeds the threshold
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- binary_sensor.server_rack_overheating
|
|
from: null
|
|
to: 'on'
|
|
conditions: []
|
|
actions:
|
|
- action: light.turn_on
|
|
data:
|
|
brightness_pct: 100
|
|
rgb_color:
|
|
- 255
|
|
- 0
|
|
- 0
|
|
flash: long
|
|
effect: Slow Pulse
|
|
target:
|
|
entity_id: light.apollo_temp_1b_42_0e5ec8_rgb_light
|
|
mode: single
|
|
- alias: 'Device Health: Z2M Offline Devices'
|
|
description: Notify about Zigbee devices that are offline for more than 24 hours
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- sensor.device_health_z2m_offline_devices
|
|
action:
|
|
- choose: []
|
|
default:
|
|
- service: notify.mobile_app_dev_phone
|
|
data:
|
|
title: Device Health
|
|
message: "The following Z2M devices are unavailable: \n{{sensors}}"
|
|
- service: notify.persistent_notification
|
|
data:
|
|
title: Device Health
|
|
message: 'The following Z2M devices are unavailable: {{sensors}}'
|
|
variables:
|
|
sensors: '{{ states(''sensor.device_health_z2m_offline_devices'') }}'
|
|
mode: single
|
|
- alias: 'Citroen C5X: Position'
|
|
description: Create or update Citroen C5X device tracker
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.c5x_latitude, sensor.c5x_longitude
|
|
- platform: time_pattern
|
|
hours: /8
|
|
action:
|
|
service: device_tracker.see
|
|
data_template:
|
|
dev_id: c5x_position
|
|
gps:
|
|
- '{{ states(''sensor.c5x_latitude'') }}'
|
|
- '{{ states(''sensor.c5x_longitude'') }}'
|
|
- alias: 'Multimedia: Living Room Amplifier - Turn On for TV'
|
|
description: If TV in the living room turns on, then turn on the amplifier and switch
|
|
input to optical
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- media_player.tv_living_room
|
|
to: 'on'
|
|
conditions: []
|
|
actions:
|
|
- if:
|
|
- condition: state
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
state: 'off'
|
|
then:
|
|
- action: switch.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
- wait_for_trigger:
|
|
- trigger: state
|
|
entity_id:
|
|
- switch.yamaha_amplifer_switch
|
|
to: 'on'
|
|
from: null
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
timeout:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 5
|
|
milliseconds: 0
|
|
- action: script.yamaha_amplifier_optical_in
|
|
data: {}
|
|
mode: single
|
|
- alias: 'Multimedia: Living Room Amplifier - Turn On for WiiM'
|
|
description: If WiiM in the living room starts playing, then turn on the amplifier
|
|
and switch input to coaxial
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- media_player.mass_living_room
|
|
- media_player.wiim_living_room
|
|
to: playing
|
|
conditions: []
|
|
actions:
|
|
- if:
|
|
- condition: state
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
state: 'off'
|
|
then:
|
|
- action: switch.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
- wait_for_trigger:
|
|
- trigger: state
|
|
entity_id:
|
|
- switch.yamaha_amplifer_switch
|
|
to: 'on'
|
|
from: null
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
timeout:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 5
|
|
milliseconds: 0
|
|
- action: script.yamaha_amplifier_coaxial_in
|
|
data: {}
|
|
mode: single
|
|
- alias: 'Multimedia: Living Room Amplifier - Turn On for Turntable'
|
|
description: If turntable in the living room turns on, then turn on the amplifier
|
|
and switch input to phono
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- binary_sensor.power_state_turntable
|
|
from: null
|
|
to: 'on'
|
|
conditions: []
|
|
actions:
|
|
- if:
|
|
- condition: state
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
state: 'off'
|
|
then:
|
|
- action: switch.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
- wait_for_trigger:
|
|
- trigger: state
|
|
entity_id:
|
|
- switch.yamaha_amplifer_switch
|
|
to: 'on'
|
|
from: null
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
timeout:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 5
|
|
milliseconds: 0
|
|
- action: script.yamaha_amplifier_phono_in
|
|
data: {}
|
|
mode: single
|
|
- alias: 'Multimedia: Living Room Amplifier - Turn Off'
|
|
description: Turn off amplifier in the living room if all multimedia devices are
|
|
inactive or turned off
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- media_player.mass_living_room
|
|
- media_player.wiim_living_room
|
|
to: idle
|
|
for:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
- trigger: state
|
|
entity_id:
|
|
- media_player.mass_living_room
|
|
- media_player.wiim_living_room
|
|
to: paused
|
|
for:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
- trigger: state
|
|
entity_id:
|
|
- media_player.tv_living_room
|
|
to: 'off'
|
|
for:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
- trigger: state
|
|
entity_id:
|
|
- binary_sensor.power_state_turntable
|
|
to: 'off'
|
|
for:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
conditions:
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.mass_living_room
|
|
state: playing
|
|
enabled: true
|
|
- condition: state
|
|
entity_id: media_player.wiim_living_room
|
|
state: playing
|
|
- condition: state
|
|
entity_id: media_player.tv_living_room
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.power_state_turntable
|
|
state: 'on'
|
|
actions:
|
|
- if:
|
|
- condition: state
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
state: 'on'
|
|
then:
|
|
- action: switch.turn_off
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
mode: single
|
|
- alias: 'Theo: Music'
|
|
description: Turn on amplifier in the living room and start streaming Theo's playlist
|
|
triggers: []
|
|
conditions: []
|
|
actions:
|
|
- if:
|
|
- condition: state
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
state: 'off'
|
|
then:
|
|
- action: switch.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
- wait_for_trigger:
|
|
- trigger: state
|
|
entity_id:
|
|
- switch.yamaha_amplifer_switch
|
|
to: 'on'
|
|
from: null
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
timeout:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 5
|
|
milliseconds: 0
|
|
- action: script.yamaha_amplifier_coaxial_in
|
|
data: {}
|
|
- action: media_player.shuffle_set
|
|
metadata: {}
|
|
data:
|
|
shuffle: true
|
|
target:
|
|
entity_id: media_player.mass_living_room
|
|
- action: music_assistant.play_media
|
|
metadata: {}
|
|
data:
|
|
media_type: playlist
|
|
enqueue: replace
|
|
media_id: Theo's List
|
|
target:
|
|
entity_id: media_player.mass_living_room
|
|
mode: single
|
|
- alias: 'Theo: Music (Nijntje)'
|
|
description: Turn on amplifier in the living room and start streaming Theo's playlist
|
|
triggers: []
|
|
conditions: []
|
|
actions:
|
|
- if:
|
|
- condition: state
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
state: 'off'
|
|
then:
|
|
- action: switch.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.yamaha_amplifer_switch
|
|
- wait_for_trigger:
|
|
- trigger: state
|
|
entity_id:
|
|
- switch.yamaha_amplifer_switch
|
|
to: 'on'
|
|
from: null
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
timeout:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 5
|
|
milliseconds: 0
|
|
- action: script.yamaha_amplifier_coaxial_in
|
|
data: {}
|
|
- action: media_player.shuffle_set
|
|
metadata: {}
|
|
data:
|
|
shuffle: false
|
|
target:
|
|
entity_id: media_player.mass_living_room
|
|
- action: music_assistant.play_media
|
|
metadata: {}
|
|
data:
|
|
media_type: playlist
|
|
enqueue: replace
|
|
media_id: Nijntje
|
|
target:
|
|
entity_id: media_player.mass_living_room
|
|
mode: single
|