1
0
ansible-home-assistant/scripts/40.pause-all-media.yaml

49 lines
1.5 KiB
YAML
Raw Normal View History

2021-05-10 10:22:34 +00:00
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