1
0
ansible-home-assistant/configuration/automations/tv-automations.yaml
Przemek Grondek c50fc91cc0 Change when to update harmony mode
switch from instantly to 5 minutes
2021-08-12 00:51:22 +02:00

44 lines
1.0 KiB
YAML

- id: tv-volume-notification
alias: '[TV] Volume notification'
mode: single
trigger:
- platform: state
entity_id: media_player.living_room
attribute: volume_level
condition:
- condition: state
entity_id: media_player.living_room
state: TV
attribute: source
action:
- service: notify.shield
data:
title: Volume 🔊
message: '{{ ( state_attr(''media_player.living_room'', ''volume_level'') * 100) | int }} %'
data:
duration: 1
color: black
- id: tv-suspend-pc
alias: '[TV] When turned on suspend PC'
description: ''
mode: single
trigger:
- platform: state
entity_id: media_player.samsung_qe55q6fam
from: 'off'
to: 'on'
action:
- service: script.pc_sleep
- id: tv-update-harmony-mode
alias: '[TV] Update harmony mode'
mode: single
trigger:
- platform: state
entity_id: media_player.samsung_qe55q6fam
to: 'unavailable'
for:
minutes: 5
action:
- service: script.tv_off