Explicitly pass in the config_entry in qnap coordinator (#138028)

explicitly pass in the config_entry in coordinator
pull/137224/head
Michael 2025-02-09 15:52:58 +01:00 committed by GitHub
parent a8c4cc7269
commit e496270c6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -33,7 +33,13 @@ class QnapCoordinator(DataUpdateCoordinator[dict[str, dict[str, Any]]]):
def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry) -> None:
"""Initialize the qnap coordinator."""
super().__init__(hass, _LOGGER, name=DOMAIN, update_interval=UPDATE_INTERVAL)
super().__init__(
hass,
_LOGGER,
config_entry=config_entry,
name=DOMAIN,
update_interval=UPDATE_INTERVAL,
)
protocol = "https" if config_entry.data[CONF_SSL] else "http"
self._api = QNAPStats(