I found a lot of times I will plan on running into my office for what I think will be 5 minutes and I end up staying there for over an hour. Using room presence I created a little automation that notices when I change rooms, waits a few minutes in case I just ran in to grab something, and then will group the speakers in my office or basement with whatever room I came from. It looks to see if sonos was playing in the room I left, and as long as it was playing and the room I enter is not already on or listening to something else it will join them together, It works great, I did not ungroup speakers once leaving a room, just because alot of times I will have a couple rooms on anyway…this will just add rooms as i move about.
sensor.dustin is happy bubbles precense detectors. It detects me within a room within a couple seconds and has been extremly accurate
Here is an example of going between two rooms
Automations
- alias: Follow me Sonos Office Living Room
trigger:
- platform: state
entity_id: sensor.dustin
to: 'Living Room'
from: 'Office'
for:
minutes: 3
condition:
- condition: state
entity_id: media_player.office
state: 'playing'
- condition: state
entity_id: media_player.living_room
state: 'paused'
action:
- service: script.turn_on
entity_id: script.sonos_join_office_liv
- alias: Follow me Sonos Living Room-Office
trigger:
- platform: state
entity_id: sensor.dustin
to: 'Office'
from: 'Living Room'
for:
minutes: 3
condition:
- condition: state
entity_id: media_player.living_room
state: 'playing'
- condition: state
entity_id: media_player.office
state: 'paused'
action:
- service: script.turn_on
entity_id: script.sonos_liv_office
Scripts
sonos_join_office_liv:
alias: Sonos Join Living Room Office
sequence:
service: media_player.sonos_join
data:
master: media_player.office
entity_id:
- media_player.office
- media_player.living_room
sonos_liv_office:
alias: Sonos Join Office And Living Room
sequence:
service: media_player.sonos_join
data:
master: media_player.living_room
entity_id:
- media_player.living_room
- media_player.office