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:
Joost Lekkerkerker 2024-04-30 12:41:34 +02:00 committed by GitHub
parent dace9b32de
commit d84d2109c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,9 +45,10 @@ class WithingsDataUpdateCoordinator(DataUpdateCoordinator[_T]):
super().__init__(
hass,
LOGGER,
name=f"Withings {self.coordinator_name}",
name="",
update_interval=self._default_update_interval,
)
self.name = f"Withings {self.config_entry.unique_id} {self.coordinator_name}"
self._client = client
self.notification_categories: set[NotificationCategory] = set()
@ -63,7 +64,11 @@ class WithingsDataUpdateCoordinator(DataUpdateCoordinator[_T]):
self, notification_category: NotificationCategory
) -> None:
"""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()
async def _async_update_data(self) -> _T: