From f1281d8215d52e79401759ac75f701b6c4bd31f1 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Fri, 15 Dec 2023 14:30:32 +0100 Subject: [PATCH] Fix harmony deprecated switches --- scripts/20.tv.yaml | 47 ++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/scripts/20.tv.yaml b/scripts/20.tv.yaml index dc6708b..30315cc 100644 --- a/scripts/20.tv.yaml +++ b/scripts/20.tv.yaml @@ -2,8 +2,11 @@ tv_nintendo_switch: alias: Nintendo Switch icon: mdi:nintendo-switch sequence: - - service: switch.turn_on - entity_id: switch.harmonyhub_play_nintendo_switch + - service: select.select_option + target: + entity_id: select.harmonyhub_activities + data: + option: Nintendo Switch - service: media_player.select_source data: source: TV @@ -18,8 +21,11 @@ tv_xbox: alias: Xbox Series X icon: mdi:microsoft-xbox sequence: - - service: switch.turn_on - entity_id: switch.harmonyhub_xbox + - service: select.select_option + target: + entity_id: select.harmonyhub_activities + data: + option: Xbox - service: media_player.select_source data: source: TV @@ -34,8 +40,11 @@ tv_ps4: alias: PlayStation 4 icon: mdi:sony-playstation sequence: - - service: switch.turn_on - entity_id: switch.harmonyhub_play_ps4 + - service: select.select_option + target: + entity_id: select.harmonyhub_activities + data: + option: PlayStation - service: media_player.select_source data: source: TV @@ -53,11 +62,14 @@ tv_atv: - choose: - conditions: - condition: state - entity_id: switch.harmonyhub_shield_tv - state: 'off' + entity_id: select.harmonyhub_activities + state: 'Power Off' sequence: - - service: switch.turn_on - entity_id: switch.harmonyhub_shield_tv + - service: select.select_option + target: + entity_id: select.harmonyhub_activities + data: + option: SHIELD TV - service: media_player.select_source data: source: TV @@ -92,16 +104,19 @@ tv_f1tv_living_room: - choose: - conditions: - condition: state - entity_id: switch.harmonyhub_shield_tv - state: 'off' + entity_id: select.harmonyhub_activities + state: 'Power Off' sequence: - service: input_select.select_option data: option: remote.shield target: entity_id: input_select.tv_select - - service: switch.turn_on - entity_id: switch.harmonyhub_shield_tv + - service: select.select_option + target: + entity_id: select.harmonyhub_activities + data: + option: SHIELD TV - service: media_player.select_source data: source: TV @@ -122,8 +137,8 @@ tv_f1tv: - choose: - conditions: - condition: state - entity_id: switch.harmonyhub_shield_tv - state: 'off' + entity_id: select.harmonyhub_activities + state: 'Power Off' sequence: - service: remote.send_command data: