1
0
ansible-home-assistant/scripts/40.pause-all-media.yaml
2021-05-25 00:10:22 +02:00

49 lines
1.5 KiB
YAML

pause_all_players:
alias: Pause all playing devices
sequence:
- choose:
- conditions:
- condition: state
entity_id: media_player.bathroom
state: playing
sequence:
- service: media_player.media_pause
target:
entity_id: media_player.bathroom
- choose:
- conditions:
- condition: state
entity_id: media_player.bedroom
state: playing
sequence:
- service: media_player.media_pause
target:
entity_id: media_player.bedroom
- choose:
- conditions:
- condition: state
entity_id: media_player.living_room
state: playing
sequence:
- service: media_player.media_pause
target:
entity_id: media_player.living_room
- choose:
- conditions:
- condition: state
entity_id: media_player.nvidia_shield
state: playing
sequence:
- service: media_player.media_pause
target:
entity_id: media_player.nvidia_shield
- choose:
- conditions:
- condition: state
entity_id: media_player.spotify_11175365349
state: playing
sequence:
- service: media_player.media_pause
target:
entity_id: media_player.spotify_11175365349