Skip to content

Commit

Permalink
Add user id to coordinator name in Withings (#116440)
Browse files Browse the repository at this point in the history
* Add user id to coordinator name in Withings

* Add user id to coordinator name in Withings

* Fix
  • Loading branch information
joostlek authored and frenck committed Apr 30, 2024
1 parent 5510315 commit 7cbb289
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions homeassistant/components/withings/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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:
Expand Down

0 comments on commit 7cbb289

Please sign in to comment.