1
0
ansible-home-assistant/configuration/automations/f1.yaml

33 lines
971 B
YAML
Raw Normal View History

2021-12-12 22:21:57 +00:00
- id: f1-automation
alias: '[F1] Automation'
mode: single
trigger:
- platform: state
entity_id: calendar.2021_fia_formula_one_world_championship_race_calendar
to: 'on'
action:
- service: media_player.play_media
data:
media_content_id: https://open.spotify.com/track/5r7egnfTIQjaKSGREhIky9?si=688bbc2db49a4980
media_content_type: music
target:
entity_id: media_player.bedroom
2021-12-12 22:39:41 +00:00
- 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
2021-12-12 22:21:57 +00:00
- service: sonos.join
data:
2021-12-12 22:39:41 +00:00
master: media_player.bedroom
2021-12-12 22:21:57 +00:00
entity_id: media_player.bathroom