From 4de3b9a5ea6685bd40b0840c4ec05865612b20dd Mon Sep 17 00:00:00 2001 From: KenwoodFox Date: Mon, 16 Aug 2021 15:41:18 -0400 Subject: [PATCH] Add in projector --- automations.yaml | 33 ++++++++++++++++++++++++++++++--- configuration.yaml | 6 ++++++ 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/automations.yaml b/automations.yaml index 4234c8c..10e054c 100755 --- a/automations.yaml +++ b/automations.yaml @@ -46,10 +46,19 @@ domain: switch mode: single - id: '1627954003317' - alias: Dim the lab lights - description: This one is a lil silly, it just turns the lights off whenever the - chrome cast is active + 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 @@ -61,6 +70,9 @@ 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. @@ -155,3 +167,18 @@ target: entity_id: group.basement 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 + condition: [] + action: + - service: media_player.turn_off + target: + entity_id: media_player.lab_projector + mode: single diff --git a/configuration.yaml b/configuration.yaml index 0a7dad4..07e7802 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -63,6 +63,12 @@ octoprint: host: 10.85.5.31 api_key: !secret octoprint_api_key +# Projectors and media players +media_player: + - platform: pjlink + name: Lab Projector + host: 10.85.5.33 + group: !include groups.yaml automation: !include automations.yaml