mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Make sonos household_coordinator setup a callback function (#113108)
This commit is contained in:
parent
6ff8d7d2b9
commit
629a045c37
@ -9,7 +9,7 @@ from typing import Any
|
||||
|
||||
from soco import SoCo
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.debounce import Debouncer
|
||||
|
||||
from .const import DATA_SONOS
|
||||
@ -35,7 +35,8 @@ class SonosHouseholdCoordinator:
|
||||
self.update_cache(soco)
|
||||
self.hass.add_job(self._async_setup)
|
||||
|
||||
async def _async_setup(self) -> None:
|
||||
@callback
|
||||
def _async_setup(self) -> None:
|
||||
"""Finish setup in async context."""
|
||||
self.cache_update_lock = asyncio.Lock()
|
||||
self.async_poll = Debouncer[Coroutine[Any, Any, None]](
|
||||
|
Loading…
x
Reference in New Issue
Block a user