Skip to content

Commit

Permalink
Explicitly pass in the config_entry in Synology DSM coordinator init (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
mib1185 authored and zxdavb committed Jan 29, 2025
1 parent 94fc059 commit 96908a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions homeassistant/components/synology_dsm/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ async def _async_wrap(self: _T, *args: _P.args, **kwargs: _P.kwargs) -> _R:
class SynologyDSMUpdateCoordinator[_DataT](DataUpdateCoordinator[_DataT]):
"""DataUpdateCoordinator base class for synology_dsm."""

config_entry: ConfigEntry

def __init__(
self,
hass: HomeAssistant,
Expand All @@ -68,10 +70,10 @@ def __init__(
) -> None:
"""Initialize synology_dsm DataUpdateCoordinator."""
self.api = api
self.entry = entry
super().__init__(
hass,
_LOGGER,
config_entry=entry,
name=f"{entry.title} {self.__class__.__name__}",
update_interval=update_interval,
)
Expand Down Expand Up @@ -174,7 +176,7 @@ async def _async_update_data(self) -> dict[str, dict[int, SynoCamera]]:
):
async_dispatcher_send(
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,
)

Expand Down

0 comments on commit 96908a8

Please sign in to comment.