mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-05 08:44:24 +00:00
Plex on TV automations
This commit is contained in:
@@ -7,9 +7,6 @@ cards:
|
|||||||
title: Automations
|
title: Automations
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- automation.youtube_download_latest_pds
|
|
||||||
- automation.tv_join_beam_to_sonos_group_when_off
|
|
||||||
|
|
||||||
- type: custom:fold-entity-row
|
- type: custom:fold-entity-row
|
||||||
head:
|
head:
|
||||||
type: custom:dummy-entity-row
|
type: custom:dummy-entity-row
|
||||||
@@ -59,6 +56,20 @@ cards:
|
|||||||
|
|
||||||
- type: divider
|
- type: divider
|
||||||
|
|
||||||
|
- type: custom:fold-entity-row
|
||||||
|
head:
|
||||||
|
type: custom:dummy-entity-row
|
||||||
|
entity: sun.sun
|
||||||
|
name: Media
|
||||||
|
icon: mdi:play-box-outline
|
||||||
|
entities:
|
||||||
|
- automation.tv_join_beam_to_sonos_group_when_off
|
||||||
|
- automation.tv_plex_setup_house_for_plex
|
||||||
|
- automation.tv_plex_restore_house_after_plex
|
||||||
|
- automation.youtube_download_latest_pds
|
||||||
|
|
||||||
|
- type: divider
|
||||||
|
|
||||||
- type: custom:fold-entity-row
|
- type: custom:fold-entity-row
|
||||||
head:
|
head:
|
||||||
type: custom:dummy-entity-row
|
type: custom:dummy-entity-row
|
||||||
|
|||||||
@@ -2,8 +2,56 @@
|
|||||||
plex:
|
plex:
|
||||||
host: !secret plex_host
|
host: !secret plex_host
|
||||||
token: !secret plex_token
|
token: !secret plex_token
|
||||||
ssl: true
|
|
||||||
verify_ssl: false
|
|
||||||
media_player:
|
media_player:
|
||||||
use_episode_art: true
|
use_episode_art: true
|
||||||
ignore_new_shared_users: false
|
ignore_new_shared_users: false
|
||||||
|
|
||||||
|
automation:
|
||||||
|
- alias: TV · Plex · Setup house for Plex
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id:
|
||||||
|
- media_player.plex_shield_chromecast
|
||||||
|
- media_player.plex_shield_player
|
||||||
|
- media_player.plex_lg
|
||||||
|
to: "playing"
|
||||||
|
action:
|
||||||
|
- service: scene.create
|
||||||
|
data:
|
||||||
|
scene_id: plex_before_start
|
||||||
|
snapshot_entities:
|
||||||
|
- light.living_room_main_lights
|
||||||
|
- light.pc
|
||||||
|
- light.tuya_hallway_entrance_lights
|
||||||
|
- light.tuya_hallway_main_lights
|
||||||
|
- light.tuya_kitchen_main_lights
|
||||||
|
- service: light.turn_off
|
||||||
|
data:
|
||||||
|
entity_id:
|
||||||
|
- light.living_room_main_lights
|
||||||
|
- light.pc
|
||||||
|
- light.tuya_hallway_entrance_lights
|
||||||
|
- light.tuya_hallway_main_lights
|
||||||
|
- light.tuya_kitchen_main_lights
|
||||||
|
|
||||||
|
- alias: TV · Plex · Restore house after Plex
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id:
|
||||||
|
- media_player.plex_shield_chromecast
|
||||||
|
- media_player.plex_shield_player
|
||||||
|
- media_player.plex_lg
|
||||||
|
from: "playing"
|
||||||
|
action:
|
||||||
|
- service: scene.turn_on
|
||||||
|
# FIXME: Light colors are not being snapshotted/restored properly.
|
||||||
|
entity_id: scene.plex_before_start
|
||||||
|
- delay: 00:00:01
|
||||||
|
- condition: state
|
||||||
|
entity_id: light.pc
|
||||||
|
state: "on"
|
||||||
|
# FIXME: There is nothing else to fix the temperature of the PC light
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.pc
|
||||||
|
data:
|
||||||
|
color_temp: 250
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ script:
|
|||||||
|
|
||||||
tv_fireplace:
|
tv_fireplace:
|
||||||
icon: mdi:fireplace
|
icon: mdi:fireplace
|
||||||
alias: TV · Fireplace
|
alias: TV · Fireplace
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.tv_prepare_for_playback
|
- service: script.tv_prepare_for_playback
|
||||||
data:
|
data:
|
||||||
|
|||||||
Reference in New Issue
Block a user