From 7cbb2892c115d97510adfffa429ee5c19c4c8929 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 30 Apr 2024 12:41:34 +0200 Subject: [PATCH] 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 --- homeassistant/components/withings/coordinator.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/withings/coordinator.py b/homeassistant/components/withings/coordinator.py index 19b362dfa0af38..0aef11aaa6b329 100644 --- a/homeassistant/components/withings/coordinator.py +++ b/homeassistant/components/withings/coordinator.py @@ -45,9 +45,10 @@ def __init__(self, hass: HomeAssistant, client: WithingsClient) -> None: 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 @@ async def async_webhook_data_updated( 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: