mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Add user id to coordinator name in Withings (#116440)
* Add user id to coordinator name in Withings * Add user id to coordinator name in Withings * Fix
This commit is contained in:
parent
dace9b32de
commit
d84d2109c2
@ -45,9 +45,10 @@ class WithingsDataUpdateCoordinator(DataUpdateCoordinator[_T]):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
hass,
|
hass,
|
||||||
LOGGER,
|
LOGGER,
|
||||||
name=f"Withings {self.coordinator_name}",
|
name="",
|
||||||
update_interval=self._default_update_interval,
|
update_interval=self._default_update_interval,
|
||||||
)
|
)
|
||||||
|
self.name = f"Withings {self.config_entry.unique_id} {self.coordinator_name}"
|
||||||
self._client = client
|
self._client = client
|
||||||
self.notification_categories: set[NotificationCategory] = set()
|
self.notification_categories: set[NotificationCategory] = set()
|
||||||
|
|
||||||
@ -63,7 +64,11 @@ class WithingsDataUpdateCoordinator(DataUpdateCoordinator[_T]):
|
|||||||
self, notification_category: NotificationCategory
|
self, notification_category: NotificationCategory
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Update data when webhook is called."""
|
"""Update data when webhook is called."""
|
||||||
LOGGER.debug("Withings webhook triggered for %s", notification_category)
|
LOGGER.debug(
|
||||||
|
"Withings webhook triggered for category %s for user %s",
|
||||||
|
notification_category,
|
||||||
|
self.config_entry.unique_id,
|
||||||
|
)
|
||||||
await self.async_request_refresh()
|
await self.async_request_refresh()
|
||||||
|
|
||||||
async def _async_update_data(self) -> _T:
|
async def _async_update_data(self) -> _T:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user