diff --git a/configuration/automations/f1.yaml b/configuration/automations/f1.yaml index 82c7959..75f9274 100644 --- a/configuration/automations/f1.yaml +++ b/configuration/automations/f1.yaml @@ -17,21 +17,13 @@ media_content_type: music target: entity_id: media_player.bedroom - - choose: - - conditions: - - condition: not - conditions: - - condition: state - entity_id: media_player.living_room - state: TV - attribute: source - sequence: - - service: sonos.join - data: - master: media_player.bedroom - entity_id: media_player.living_room - service: sonos.join data: master: media_player.bedroom entity_id: media_player.bathroom - + - service: script.tv_f1tv + - delay: '0:05:00' + - service: sonos.unjoin + data: { } + target: + entity_id: media_player.bathroom diff --git a/configuration/configuration.yaml b/configuration/configuration.yaml index 49d21c1..2b1fdf1 100644 --- a/configuration/configuration.yaml +++ b/configuration/configuration.yaml @@ -255,6 +255,7 @@ media_player: pl.redefine.ipla: IPLA com.amazon.amazonvideo.livingroom: Prime Video eu.hbogo.androidtv.production: HBO GO + com.formulaone.production: F1TV state_detection_rules: 'com.netflix.ninja': - 'media_session_state' diff --git a/scripts/20.tv.yaml b/scripts/20.tv.yaml index 6ef05db..7a1cb2f 100644 --- a/scripts/20.tv.yaml +++ b/scripts/20.tv.yaml @@ -73,6 +73,44 @@ tv_atv: entity_id: media_player.sync_box data: mode: video +tv_f1tv: + alias: tv F1 + icon: mdi:android + sequence: + - choose: + - conditions: + - condition: state + entity_id: switch.harmonyhub_shield_tv + state: 'off' + sequence: + - service: switch.turn_on + entity_id: switch.harmonyhub_shield_tv + - service: media_player.select_source + data: + source: TV + target: + entity_id: media_player.living_room + - delay: 5 + - service: androidtv.adb_command + data: + command: HOME + entity_id: media_player.nvidia_shield + - delay: 5 + - service: media_player.select_source + data: + source: com.formulaone.production + target: + entity_id: media_player.nvidia_shield + - delay: 5 + - service: androidtv.adb_command + data: + command: CENTER + entity_id: media_player.nvidia_shield + - service: huesyncbox.set_sync_mode + target: + entity_id: media_player.sync_box + data: + mode: video tv_off: alias: 'TV Off' icon: mdi:power