Recent issue with "media_player/sonos_join"

Anyone have any idea what I am doing wrong with the following line of code:

joinname = media_player.office_2
master_device = media_player.dining_room

self.call_service(“media_player/sonos_join”, entity_id=joinname, master=master_device)

The code has been working for at least six months then suddenly stopped working a few weeks ago and to my knowledge I haven’t changed any code. I have updating appdaemon and Hassio (and a Sonos update).

Error log -

2019-05-28 10:08:25.978425 WARNING AppDaemon: ------------------------------------------------------------
2019-05-28 10:08:25.980238 WARNING AppDaemon: Unexpected error in worker for App sonos_on_manual:
2019-05-28 10:08:25.981518 WARNING AppDaemon: Worker Ags: {‘name’: ‘sonos_on_manual’, ‘id’: UUID(‘f4708e5a-cc72-4758-99d7-2eeaaa5cf7d2’), ‘type’: ‘attr’, ‘function’: <bound method sonos_manual_on.mode_event of <sonos.sonos_manual_on object at 0x759400b0>>, ‘attribute’: ‘state’, ‘entity’: ‘input_boolean.boolean_switch’, ‘new_state’: ‘on’, ‘old_state’: ‘off’, ‘kwargs’: {‘state’: ‘on’, ‘handle’: UUID(‘bf52e78f-cc5f-412e-83c3-4ee08b2e8449’)}}
2019-05-28 10:08:25.982496 WARNING AppDaemon: ------------------------------------------------------------
2019-05-28 10:08:25.988318 WARNING AppDaemon: Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/appdaemon/appdaemon.py”, line 595, in worker
self.sanitize_state_kwargs(app, args[“kwargs”]))
File “/config/appdaemon/apps/sonos.py”, line 42, in mode_event
self.join.set_join1(self, globals.joinmedia)
File “/config/appdaemon/apps/sonos.py”, line 239, in set_join1
self.call_service(“media_player/sonos_join”, entity_id=joinname, master=master)
File “/usr/local/lib/python3.7/site-packages/appdaemon/plugins/hass/hassapi.py”, line 22, in func_wrapper
return func(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/appdaemon/plugins/hass/hassapi.py”, line 522, in call_service
r.raise_for_status()
File “/usr/local/lib/python3.7/site-packages/requests/models.py”, line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://hassio/homeassistant/api/services/media_player/sonos_join

2019-05-28 10:08:25.989547 WARNING AppDaemon: ------------------------------------------------------------
Anyone any ideas?

Hello,

If you upgrade HA to the latest, there is a breaking change to the Sonos service, as Sonos is now a domain of its own.

So do look via the latest update breaking changes here, and you will see it.

Hope it helps

Thanks. Obviously a case of RTF. Strangely I must have started reading the release note as I remember the the issue about Nest but must have been distracted and didn’t read on. I will next time :slight_smile:

Thanks for the help.