mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Explicitly pass in the config_entry in Synology DSM coordinator init (#136772)
This commit is contained in:
parent
c2cbbf1e1c
commit
3638eb1d34
@ -59,6 +59,8 @@ def async_re_login_on_expired[_T: SynologyDSMUpdateCoordinator[Any], **_P, _R](
|
|||||||
class SynologyDSMUpdateCoordinator[_DataT](DataUpdateCoordinator[_DataT]):
|
class SynologyDSMUpdateCoordinator[_DataT](DataUpdateCoordinator[_DataT]):
|
||||||
"""DataUpdateCoordinator base class for synology_dsm."""
|
"""DataUpdateCoordinator base class for synology_dsm."""
|
||||||
|
|
||||||
|
config_entry: ConfigEntry
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
@ -68,10 +70,10 @@ class SynologyDSMUpdateCoordinator[_DataT](DataUpdateCoordinator[_DataT]):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize synology_dsm DataUpdateCoordinator."""
|
"""Initialize synology_dsm DataUpdateCoordinator."""
|
||||||
self.api = api
|
self.api = api
|
||||||
self.entry = entry
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
|
config_entry=entry,
|
||||||
name=f"{entry.title} {self.__class__.__name__}",
|
name=f"{entry.title} {self.__class__.__name__}",
|
||||||
update_interval=update_interval,
|
update_interval=update_interval,
|
||||||
)
|
)
|
||||||
@ -174,7 +176,7 @@ class SynologyDSMCameraUpdateCoordinator(
|
|||||||
):
|
):
|
||||||
async_dispatcher_send(
|
async_dispatcher_send(
|
||||||
self.hass,
|
self.hass,
|
||||||
f"{SIGNAL_CAMERA_SOURCE_CHANGED}_{self.entry.entry_id}_{cam_id}",
|
f"{SIGNAL_CAMERA_SOURCE_CHANGED}_{self.config_entry.entry_id}_{cam_id}",
|
||||||
cam_data_new.live_view.rtsp,
|
cam_data_new.live_view.rtsp,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user