Explicitly pass in the config_entry in thethingsnetwork coordinator (#137905)

explicitly pass in the config_entry in coordinator
This commit is contained in:
Michael 2025-02-09 14:34:36 +01:00 committed by GitHub
parent 794143c32f
commit 4031f85acc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,11 +19,14 @@ _LOGGER = logging.getLogger(__name__)
class TTNCoordinator(DataUpdateCoordinator[TTNClient.DATA_TYPE]):
"""TTN coordinator."""
config_entry: ConfigEntry
def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
"""Initialize my coordinator."""
super().__init__(
hass,
_LOGGER,
config_entry=entry,
# Name of the data. For logging purposes.
name=f"TheThingsNetwork_{entry.data[CONF_APP_ID]}",
# Polling interval. Will only be polled if there are subscribers.