From ae2ddf20bf5a10ec86fabc40cda9c3a20d7f0e78 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Thu, 29 Apr 2021 08:01:09 +0200 Subject: [PATCH] Add PC suspend when tv is turned on --- .../files/automations/tv-automations.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/automations/files/automations/tv-automations.yaml b/automations/files/automations/tv-automations.yaml index f5c14f2..3219ee8 100644 --- a/automations/files/automations/tv-automations.yaml +++ b/automations/files/automations/tv-automations.yaml @@ -1,5 +1,5 @@ -- id: tv-volume notification - alias: '[Phone] Sleep as Android' +- id: tv-volume-notification + alias: '[TV] Volume notification' mode: single trigger: - platform: state @@ -17,4 +17,15 @@ message: '{{ ( state_attr(''media_player.living_room'', ''volume_level'') * 100) | int }} %' data: duration: 1 - color: black \ No newline at end of file + 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