Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions homeassistant/components/media_player/sonos.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ def add_entities(devices, update_before_add=False):
"""Sync version of async add devices."""
hass.add_job(async_add_entities, devices, update_before_add)

hass.add_job(_setup_platform, hass,
hass.data[SONOS_DOMAIN].get('media_player', {}),
add_entities, None)
hass.async_add_executor_job(
_setup_platform, hass, hass.data[SONOS_DOMAIN].get('media_player', {}),
add_entities, None)


def _setup_platform(hass, config, add_entities, discovery_info):
Expand Down Expand Up @@ -366,7 +366,7 @@ def __init__(self, player):
async def async_added_to_hass(self):
"""Subscribe sonos events."""
self.hass.data[DATA_SONOS].devices.append(self)
self.hass.async_add_job(self._subscribe_to_player_events)
self.hass.async_add_executor_job(self._subscribe_to_player_events)

@property
def unique_id(self):
Expand Down