2021-12-14 14:46:02 +00:00
|
|
|
- id: ra-music-bathroom-arrive
|
|
|
|
alias: '[RA] Bathroom arrive'
|
|
|
|
mode: single
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: sensor.przemyslaws_apple_watch_room_presence
|
|
|
|
to: ra-bathroom
|
|
|
|
condition:
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bedroom
|
|
|
|
state: playing
|
|
|
|
action:
|
2022-08-10 21:25:11 +00:00
|
|
|
- service: media_player.join
|
2021-12-14 14:46:02 +00:00
|
|
|
data:
|
2022-08-10 21:25:11 +00:00
|
|
|
group_members: media_player.bedroom
|
|
|
|
target:
|
2021-12-14 14:46:02 +00:00
|
|
|
entity_id: media_player.bathroom
|
|
|
|
|
|
|
|
- id: ra-music-bathroom-leave
|
|
|
|
alias: '[RA] Bathroom leave'
|
|
|
|
mode: single
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: sensor.przemyslaws_apple_watch_room_presence
|
|
|
|
from: ra-bathroom
|
|
|
|
for: '0:01:00'
|
|
|
|
condition:
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bathroom
|
|
|
|
state: playing
|
|
|
|
action:
|
2022-08-10 21:25:11 +00:00
|
|
|
- service: media_player.unjoin
|
|
|
|
target:
|
2021-12-14 14:46:02 +00:00
|
|
|
entity_id: media_player.bathroom
|
|
|
|
|
|
|
|
- id: ra-music-bedroom-arrive
|
|
|
|
alias: '[RA] Bedroom arrive'
|
|
|
|
mode: single
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: sensor.przemyslaws_apple_watch_room_presence
|
|
|
|
to: ra-bedroom
|
|
|
|
condition:
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bathroom
|
|
|
|
state: playing
|
|
|
|
action:
|
2022-08-10 21:25:11 +00:00
|
|
|
- service: media_player.join
|
2021-12-14 14:46:02 +00:00
|
|
|
data:
|
2022-08-10 21:25:11 +00:00
|
|
|
group_members: media_player.bathroom
|
|
|
|
target:
|
2021-12-14 14:46:02 +00:00
|
|
|
entity_id: media_player.bedroom
|
|
|
|
|
|
|
|
- id: ra-music-bedroom-leave
|
|
|
|
alias: '[RA] Bedroom leave'
|
|
|
|
mode: single
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: sensor.przemyslaws_apple_watch_room_presence
|
2022-01-30 12:45:45 +00:00
|
|
|
from: ra-bedroom
|
2021-12-14 14:46:02 +00:00
|
|
|
for: '0:01:00'
|
|
|
|
condition:
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bedroom
|
|
|
|
state: playing
|
|
|
|
action:
|
|
|
|
- service: sonos.unjoin
|
2022-08-10 21:25:11 +00:00
|
|
|
target:
|
2021-12-14 14:46:02 +00:00
|
|
|
entity_id: media_player.bedroom
|
|
|
|
|