Basic TV/Shield state automation

This commit is contained in:
2020-04-29 00:02:15 +03:00
parent 247f84c088
commit 2c21122556
3 changed files with 46 additions and 0 deletions

View File

@@ -79,6 +79,11 @@ cards:
tap_action: none
entities:
- automation.tv_join_beam_to_sonos_group_when_off
- automation.tv_state_sync_on_tv_on
- automation.tv_state_sync_on_tv_off
- automation.tv_state_sync_on_shield_on
- automation.tv_state_sync_on_shield_off
- type: divider
- automation.tv_plex_setup_house_for_plex
- automation.tv_plex_restore_house_after_plex
- automation.youtube_download_latest_pds

View File

@@ -94,6 +94,8 @@
- type: custom:button-card
template: default
entity: media_player.living_room_tv
tap_action:
action: toggle
- type: custom:button-card
template: default
entity: switch.titanium_power

View File

@@ -76,6 +76,45 @@ automation:
data:
master: media_player.master_bedroom
entity_id: media_player.living_room
- alias: TV · State · Sync on TV on
trigger:
platform: state
entity_id: media_player.living_room_tv
to: "on"
action:
- service: media_player.turn_on
entity_id: media_player.nvidia_shield
- alias: TV · State · Sync on TV off
trigger:
platform: state
entity_id: media_player.living_room_tv
to: "off"
action:
- service: media_player.turn_off
entity_id: media_player.nvidia_shield
- alias: TV · State · Sync on Shield on
trigger:
platform: state
entity_id: media_player.nvidia_shield
from: "off"
action:
- service: media_player.turn_on
entity_id: media_player.living_room_tv
- service: media_player.select_source
entity_id: media_player.living_room_tv
data:
source: "Shield"
- alias: TV · State · Sync on Shield off
trigger:
platform: state
entity_id: media_player.nvidia_shield
to: "off"
action:
- service: media_player.turn_off
entity_id: media_player.living_room_tv
homeassistant:
customize: