Add ability to pass the config entry explicitly in data update coordinators (#127980)

* Add ability to pass the config entry explicitely in data update coordinators

* Implement in accuweather

* Raise if config entry not set

* Move accuweather models

* Fix gogogate2

* Fix rainforest_raven
This commit is contained in:
epenet
2024-10-10 10:20:15 +02:00
committed by GitHub
parent 9b3f92e265
commit f504c27972
10 changed files with 115 additions and 41 deletions

View File

@@ -28,7 +28,6 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from . import AccuWeatherConfigEntry
from .const import (
API_METRIC,
ATTR_CATEGORY,
@@ -41,6 +40,7 @@ from .const import (
MAX_FORECAST_DAYS,
)
from .coordinator import (
AccuWeatherConfigEntry,
AccuWeatherDailyForecastDataUpdateCoordinator,
AccuWeatherObservationDataUpdateCoordinator,
)