Sonos starts playing in wrong room after a while

Hi there, I’m having a problem which I can’t figure out myself and I didn’t find the solution on this forum or anywhere else. So hopefully anyone here can help or point me in the right direction.

Setup:

  • Gira Friends of Hue buttons
  • Sonos playbar + 2 play1 speakers (living room)
  • Sonos play 1 (office)

Use case:
In the living room when I press on of the buttons a radio station starts playing in the living room. Simple use case. But after a while when I press a button, the play1 in my office starts playing the selected radio station. So the button is sending the request to another room.

Good to know

  • It’s happening on a regular basis. Lets say twice a month. Buttons are used daily.
  • When I reset Home Assistant or unplug/plug the power, it starts working as normal again
  • When the TV is turned on, Sonos detects it and turns on the TV sound. I’m not sure but I have a feeling this has something to do with it.

If anyone has any clue how to solve this, I’d be really happy. (I’m even thinking about a nightly reset, so at least it fixes itself :slight_smile:)

Part of the YAML code

alias: Gira knoppen voor muziek
description: ""
use_blueprint:
  path: myGithub-Markus/deconz_friends_of_hue_smart_switch_fourfold_button.yaml
  input:
    remote: d04c13332d43ceb55f6c47c01af8811c
    button_one_single_press:
      - service: media_player.play_media
        data:
          media_content_id: >-
            x-rincon-mp3radio://playerservices.streamtheworld.com/api/livestream-redirect/TLPSTR15.mp3
          media_content_type: music
          enqueue: play
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
      - service: media_player.volume_set
        target:
          entity_id: media_player.huiskamer
        data:
          volume_level: 0.08
    button_two_single_press:
      - service: media_player.play_media
        data:
          media_content_id: >-
            x-rincon-mp3radio://wdr-1live-live.icecastssl.wdr.de/wdr/1live/live/mp3/128/stream.mp3
          media_content_type: music
          enqueue: play
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
      - service: media_player.volume_set
        target:
          entity_id: media_player.huiskamer
        data:
          volume_level: 0.1
    button_three_single_press:
      - service: media_player.play_media
        data:
          media_content_id: x-rincon-mp3radio://stream.slam.nl/slam_mp3
          media_content_type: music
          enqueue: play
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
      - service: media_player.volume_set
        data:
          volume_level: 0.1
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
    button_four_single_press:
      - service: media_player.media_stop
        data: {}
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
      - service: media_player.volume_set
        data:
          volume_level: 0.08
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
    button_one_hold_in:
      - service: media_player.volume_up
        target:
          entity_id: media_player.huiskamer
        data: {}
    button_two_hold_in:
      - service: media_player.volume_down
        target:
          entity_id: media_player.huiskamer
        data: {}
    button_three_hold_in:
      - service: media_player.volume_up
        target:
          entity_id: media_player.huiskamer
        data: {}
    button_four_hold_in:
      - service: media_player.volume_down
        target:
          entity_id: media_player.huiskamer
        data: {}
    button_three_hold_release:
      - service: media_player.play_media
        target:
          entity_id: media_player.huiskamer
        data:
          media_content_id: FV:2/20
          media_content_type: favorite_item_id
        metadata:
          title: Linde
          thumbnail: >-
            https://mosaic.scdn.co/640/ab67616d0000b27321d16e1046552232a31f68c7ab67616d0000b273726d28899f53c0d70617d982ab67616d0000b273ccb6abbf2da4aedad40fc69aab67616d0000b273f961b852a6373d8bdd91c258
          media_class: playlist
          children_media_class: null
          navigateIds:
            - {}
            - media_content_type: favorites
              media_content_id: ""
            - media_content_type: favorites_folder
              media_content_id: object.container.playlistContainer
      - service: media_player.volume_set
        data:
          volume_level: 0.08
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
    button_one_hold_release:
      - service: media_player.play_media
        data:
          media_content_type: music
          enqueue: play
          media_content_id: x-rincon-mp3radio://icecast.omroep.nl/radio2-sterrennl-mp3
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
      - service: media_player.volume_set
        data:
          volume_level: 0.08
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
    button_two_hold_release:
      - service: media_player.play_media
        data:
          media_content_id: >-
            x-rincon-mp3radio://playerservices.streamtheworld.com/api/livestream-redirect/SKYRADIO.mp3
          media_content_type: music
          enqueue: play
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf
      - service: media_player.volume_set
        data:
          volume_level: 0.08
        target:
          device_id: 72fd304dd6e4c506fb265671ff9acfbf