Initialise coordinator with config_entry in components (part 1) (#128080)
This commit is contained in:
parent
cbb8d76da7
commit
2c7d0b8909
56 changed files with 72 additions and 0 deletions
|
@ -55,6 +55,7 @@ async def async_setup_entry(
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="Advantage Air",
|
||||
update_method=async_get,
|
||||
update_interval=timedelta(seconds=ADVANTAGE_AIR_SYNC_INTERVAL),
|
||||
|
|
|
@ -42,6 +42,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: AirthingsConfigEntry) ->
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=_update_method,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
|
|
|
@ -204,6 +204,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: AirVisualConfigEntry) ->
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=async_get_geography_id(entry.data),
|
||||
# We give a placeholder update interval in order to create the coordinator;
|
||||
# then, below, we use the coordinator's presence (along with any other
|
||||
|
|
|
@ -81,6 +81,7 @@ async def async_setup_entry(
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name="Node/Pro data",
|
||||
update_interval=UPDATE_INTERVAL,
|
||||
update_method=async_get_data,
|
||||
|
|
|
@ -171,6 +171,7 @@ async def async_setup_entry(
|
|||
coordinators[CONNECTED_PLC_DEVICES] = DevoloDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=CONNECTED_PLC_DEVICES,
|
||||
semaphore=semaphore,
|
||||
update_method=async_update_connected_plc_devices,
|
||||
|
@ -180,6 +181,7 @@ async def async_setup_entry(
|
|||
coordinators[SWITCH_LEDS] = DevoloDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=SWITCH_LEDS,
|
||||
semaphore=semaphore,
|
||||
update_method=async_update_led_status,
|
||||
|
@ -189,6 +191,7 @@ async def async_setup_entry(
|
|||
coordinators[LAST_RESTART] = DevoloDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=LAST_RESTART,
|
||||
semaphore=semaphore,
|
||||
update_method=async_update_last_restart,
|
||||
|
@ -198,6 +201,7 @@ async def async_setup_entry(
|
|||
coordinators[REGULAR_FIRMWARE] = DevoloDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=REGULAR_FIRMWARE,
|
||||
semaphore=semaphore,
|
||||
update_method=async_update_firmware_available,
|
||||
|
@ -207,6 +211,7 @@ async def async_setup_entry(
|
|||
coordinators[CONNECTED_WIFI_CLIENTS] = DevoloDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=CONNECTED_WIFI_CLIENTS,
|
||||
semaphore=semaphore,
|
||||
update_method=async_update_wifi_connected_station,
|
||||
|
@ -215,6 +220,7 @@ async def async_setup_entry(
|
|||
coordinators[NEIGHBORING_WIFI_NETWORKS] = DevoloDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=NEIGHBORING_WIFI_NETWORKS,
|
||||
semaphore=semaphore,
|
||||
update_method=async_update_wifi_neighbor_access_points,
|
||||
|
@ -223,6 +229,7 @@ async def async_setup_entry(
|
|||
coordinators[SWITCH_GUEST_WIFI] = DevoloDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=SWITCH_GUEST_WIFI,
|
||||
semaphore=semaphore,
|
||||
update_method=async_update_guest_wifi_status,
|
||||
|
|
|
@ -46,6 +46,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator[GlucoseReading](
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=async_update_data,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
|
|
|
@ -69,6 +69,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=lock.name,
|
||||
update_method=_async_update,
|
||||
update_interval=timedelta(seconds=UPDATE_SECONDS),
|
||||
|
|
|
@ -48,6 +48,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator[dict[str, dict[str, Any]]](
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="sensor",
|
||||
update_method=_async_update_data,
|
||||
update_interval=timedelta(seconds=15 * 60),
|
||||
|
|
|
@ -31,6 +31,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: EmonitorConfigEntry) ->
|
|||
coordinator = DataUpdateCoordinator[EmonitorStatus](
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=entry.title,
|
||||
update_method=emonitor.async_get_status,
|
||||
update_interval=timedelta(seconds=DEFAULT_UPDATE_RATE),
|
||||
|
|
|
@ -46,6 +46,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="duty binary sensor",
|
||||
update_method=async_update_data,
|
||||
update_interval=MIN_TIME_BETWEEN_UPDATES,
|
||||
|
|
|
@ -54,6 +54,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="sensor",
|
||||
update_method=async_update_data,
|
||||
update_interval=timedelta(seconds=POLLING_INTERVAL),
|
||||
|
|
|
@ -76,6 +76,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = coordinators[sensor_type] = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{entry.data[CONF_ZIP_CODE]} {sensor_type}",
|
||||
update_interval=DEFAULT_SCAN_INTERVAL,
|
||||
update_method=partial(async_get_data_from_api, api_coro),
|
||||
|
|
|
@ -53,6 +53,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=async_update,
|
||||
update_interval=timedelta(seconds=60),
|
||||
|
|
|
@ -83,6 +83,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="JuiceNet",
|
||||
update_method=async_update_data,
|
||||
update_interval=timedelta(seconds=30),
|
||||
|
|
|
@ -44,6 +44,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{MANUFACTURER} {hub.name}",
|
||||
update_method=async_update_data,
|
||||
update_interval=timedelta(seconds=30),
|
||||
|
|
|
@ -51,6 +51,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=async_update,
|
||||
update_interval=timedelta(hours=1),
|
||||
|
|
|
@ -66,6 +66,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=led_ble.name,
|
||||
update_method=_async_update,
|
||||
update_interval=timedelta(seconds=UPDATE_SECONDS),
|
||||
|
|
|
@ -52,6 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator: DataUpdateCoordinator[dict[str, Any]] = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{DOMAIN}_{sensor_community.sensor_id}",
|
||||
update_interval=DEFAULT_SCAN_INTERVAL,
|
||||
update_method=async_update,
|
||||
|
|
|
@ -95,6 +95,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator[Lyric](
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
# Name of the data. For logging purposes.
|
||||
name="lyric_coordinator",
|
||||
update_method=async_update_data,
|
||||
|
|
|
@ -64,6 +64,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
# Name of the data. For logging purposes.
|
||||
name="meater_api",
|
||||
update_method=async_update_data,
|
||||
|
|
|
@ -53,6 +53,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=_async_update_method,
|
||||
update_interval=timedelta(seconds=DEFAULT_SCAN_INTERVAL),
|
||||
|
|
|
@ -46,6 +46,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_method=_async_update_data,
|
||||
update_interval=UPDATE_INTERVAL,
|
||||
|
|
|
@ -32,6 +32,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"Meteoclimatic weather for {entry.title} ({station_code})",
|
||||
update_method=async_update_data,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
|
|
|
@ -109,6 +109,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
metoffice_hourly_coordinator = TimestampDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"MetOffice Hourly Coordinator for {site_name}",
|
||||
update_method=async_update_3hourly,
|
||||
update_interval=DEFAULT_SCAN_INTERVAL,
|
||||
|
@ -117,6 +118,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
metoffice_daily_coordinator = TimestampDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"MetOffice Daily Coordinator for {site_name}",
|
||||
update_method=async_update_daily,
|
||||
update_interval=DEFAULT_SCAN_INTERVAL,
|
||||
|
|
|
@ -322,6 +322,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=async_update_data,
|
||||
update_interval=DEFAULT_SCAN_INTERVAL,
|
||||
|
|
|
@ -27,6 +27,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
logging.getLogger(__name__),
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=async_get_mullvad_api_data,
|
||||
update_interval=timedelta(minutes=1),
|
||||
|
|
|
@ -45,6 +45,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
update_coordinator.DataUpdateCoordinator(
|
||||
hass,
|
||||
logging.getLogger(__name__),
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_interval=UPDATE_INTERVAL_NOT_IN_MEETING,
|
||||
update_method=update_data,
|
||||
|
|
|
@ -93,6 +93,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{router.device_name} Devices",
|
||||
update_method=async_update_devices,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
|
@ -100,6 +101,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator_traffic_meter = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{router.device_name} Traffic meter",
|
||||
update_method=async_update_traffic_meter,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
|
@ -107,6 +109,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator_speed_test = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{router.device_name} Speed test",
|
||||
update_method=async_update_speed_test,
|
||||
update_interval=SPEED_TEST_INTERVAL,
|
||||
|
@ -114,6 +117,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator_firmware = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{router.device_name} Firmware",
|
||||
update_method=async_check_firmware,
|
||||
update_interval=SCAN_INTERVAL_FIRMWARE,
|
||||
|
@ -121,6 +125,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator_utilization = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{router.device_name} Utilization",
|
||||
update_method=async_update_utilization,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
|
@ -128,6 +133,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator_link = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{router.device_name} Ethernet Link Status",
|
||||
update_method=async_check_link_status,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
|
|
|
@ -60,6 +60,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"nuheat {serial_number}",
|
||||
update_method=_async_update_data,
|
||||
update_interval=timedelta(minutes=5),
|
||||
|
|
|
@ -86,6 +86,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: NutConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="NUT resource status",
|
||||
update_method=async_update_data,
|
||||
update_interval=timedelta(seconds=scan_interval),
|
||||
|
|
|
@ -110,6 +110,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: NWSConfigEntry) -> bool:
|
|||
coordinator_forecast = TimestampDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"NWS forecast station {station}",
|
||||
update_method=async_setup_update_forecast(0, 0),
|
||||
update_interval=DEFAULT_SCAN_INTERVAL,
|
||||
|
@ -121,6 +122,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: NWSConfigEntry) -> bool:
|
|||
coordinator_forecast_hourly = TimestampDataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"NWS forecast hourly station {station}",
|
||||
update_method=async_setup_update_forecast_hourly(0, 0),
|
||||
update_interval=DEFAULT_SCAN_INTERVAL,
|
||||
|
|
|
@ -43,6 +43,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: OncueConfigEntry) -> boo
|
|||
coordinator = DataUpdateCoordinator[dict[str, OncueDevice]](
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"Oncue {entry.data[CONF_USERNAME]}",
|
||||
update_interval=timedelta(minutes=10),
|
||||
update_method=_async_update,
|
||||
|
|
|
@ -62,6 +62,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator: DataUpdateCoordinator[Forecast] = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{DOMAIN}_{entry.data[CONF_ZONE]}",
|
||||
update_interval=SCAN_INTERVAL,
|
||||
update_method=async_update_forecast,
|
||||
|
|
|
@ -67,6 +67,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator[OVODailyUsage](
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
# Name of the data. For logging purposes.
|
||||
name="sensor",
|
||||
update_method=async_update_data,
|
||||
|
|
|
@ -68,6 +68,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
outage_coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name="PECO Outage Count",
|
||||
update_method=async_update_outage_data,
|
||||
update_interval=timedelta(minutes=OUTAGE_SCAN_INTERVAL),
|
||||
|
@ -97,6 +98,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
meter_coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name="PECO Smart Meter",
|
||||
update_method=async_update_meter_data,
|
||||
update_interval=timedelta(minutes=SMART_METER_SCAN_INTERVAL),
|
||||
|
|
|
@ -118,6 +118,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: PiHoleConfigEntry) -> bo
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=name,
|
||||
update_method=async_update_data,
|
||||
update_interval=MIN_TIME_BETWEEN_UPDATES,
|
||||
|
|
|
@ -168,6 +168,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: PowerwallConfigEntry) ->
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="Powerwall site",
|
||||
update_method=manager.async_update_data,
|
||||
update_interval=timedelta(seconds=UPDATE_INTERVAL),
|
||||
|
|
|
@ -23,6 +23,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator: DataUpdateCoordinator[Vehicle] = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{DOMAIN}_APK",
|
||||
update_interval=SCAN_INTERVAL,
|
||||
update_method=rdw.vehicle,
|
||||
|
|
|
@ -52,6 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=(
|
||||
f"Place {entry.data[CONF_PLACE_ID]}, Service {entry.data[CONF_SERVICE_ID]}"
|
||||
),
|
||||
|
|
|
@ -152,6 +152,7 @@ async def async_setup_entry(
|
|||
device_coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=f"reolink.{host.api.nvr_name}",
|
||||
update_method=async_device_config_update,
|
||||
update_interval=DEVICE_UPDATE_INTERVAL,
|
||||
|
@ -159,6 +160,7 @@ async def async_setup_entry(
|
|||
firmware_coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=f"reolink.{host.api.nvr_name}.firmware",
|
||||
update_method=async_check_firmware_update,
|
||||
update_interval=FIRMWARE_UPDATE_INTERVAL,
|
||||
|
|
|
@ -60,6 +60,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator: SENZDataUpdateCoordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=account.username,
|
||||
update_interval=UPDATE_INTERVAL,
|
||||
update_method=update_thermostats,
|
||||
|
|
|
@ -92,6 +92,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="sma",
|
||||
update_method=async_update_data,
|
||||
update_interval=interval,
|
||||
|
|
|
@ -64,6 +64,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="Smart Meter Texas",
|
||||
update_method=async_update_data,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
|
|
|
@ -54,6 +54,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: SolaxConfigEntry) -> boo
|
|||
coordinator = SolaxDataUpdateCoordinator(
|
||||
hass,
|
||||
logger=_LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"solax {entry.title}",
|
||||
update_interval=SCAN_INTERVAL,
|
||||
update_method=_async_update,
|
||||
|
|
|
@ -77,6 +77,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: SpotifyConfigEntry) -> b
|
|||
hass,
|
||||
LOGGER,
|
||||
name=f"{entry.title} Devices",
|
||||
config_entry=entry,
|
||||
update_interval=timedelta(minutes=5),
|
||||
update_method=_update_devices,
|
||||
)
|
||||
|
|
|
@ -85,6 +85,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=COORDINATOR_NAME,
|
||||
update_method=async_update_data,
|
||||
update_interval=timedelta(seconds=FETCH_INTERVAL),
|
||||
|
|
|
@ -52,6 +52,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator[SyncThru](
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=async_update_data,
|
||||
update_interval=timedelta(seconds=30),
|
||||
|
|
|
@ -71,6 +71,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator: DataUpdateCoordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="tesla-wallconnector",
|
||||
update_interval=get_poll_interval(entry),
|
||||
update_method=async_update_data,
|
||||
|
|
|
@ -101,6 +101,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = coordinators[tile_uuid] = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=tile.name,
|
||||
update_interval=DEFAULT_UPDATE_INTERVAL,
|
||||
update_method=partial(async_update_tile, tile),
|
||||
|
|
|
@ -42,6 +42,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator: TwenteMilieuDataUpdateCoordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
update_method=twentemilieu.update,
|
||||
|
|
|
@ -58,6 +58,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=entry.title,
|
||||
update_interval=DEFAULT_UPDATE_INTERVAL,
|
||||
update_method=async_update_data,
|
||||
|
|
|
@ -35,6 +35,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator: DataUpdateCoordinator[Domain | None] = DataUpdateCoordinator(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=f"{DOMAIN}_APK",
|
||||
update_interval=SCAN_INTERVAL,
|
||||
update_method=_async_query_domain,
|
||||
|
|
|
@ -103,6 +103,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass=hass,
|
||||
logger=_LOGGER,
|
||||
config_entry=entry,
|
||||
name=entry.title,
|
||||
update_interval=timedelta(seconds=15),
|
||||
update_method=_async_update,
|
||||
|
|
|
@ -100,6 +100,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=DOMAIN,
|
||||
update_method=async_update_data,
|
||||
update_interval=timedelta(seconds=60),
|
||||
|
|
|
@ -388,6 +388,7 @@ async def async_create_miio_device_and_coordinator(
|
|||
coordinator = coordinator_class(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=name,
|
||||
update_method=update_method(hass, device),
|
||||
# Polling interval. Will only be polled if there are subscribers.
|
||||
|
@ -453,6 +454,7 @@ async def async_setup_gateway_entry(hass: HomeAssistant, entry: ConfigEntry) ->
|
|||
coordinator_dict[sub_device.sid] = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=name,
|
||||
update_method=update_data_factory(sub_device),
|
||||
# Polling interval. Will only be polled if there are subscribers.
|
||||
|
|
|
@ -36,6 +36,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
coordinator = DataUpdateCoordinator(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name="youless_gateway",
|
||||
update_method=async_update_data,
|
||||
update_interval=timedelta(seconds=10),
|
||||
|
|
Loading…
Add table
Reference in a new issue