Use PEP 695 type alias for ConfigEntry types (#117632)
parent
0b8a5ac9ad
commit
44049c34f9
|
@ -33,7 +33,7 @@ class AccuWeatherData:
|
|||
coordinator_daily_forecast: AccuWeatherDailyForecastDataUpdateCoordinator
|
||||
|
||||
|
||||
AccuWeatherConfigEntry = ConfigEntry[AccuWeatherData]
|
||||
type AccuWeatherConfigEntry = ConfigEntry[AccuWeatherData]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: AccuWeatherConfigEntry) -> bool:
|
||||
|
|
|
@ -10,7 +10,7 @@ CONF_HUBS = "hubs"
|
|||
|
||||
PLATFORMS = [Platform.COVER, Platform.SENSOR]
|
||||
|
||||
AcmedaConfigEntry = ConfigEntry[PulseHub]
|
||||
type AcmedaConfigEntry = ConfigEntry[PulseHub]
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
|
|
|
@ -43,7 +43,7 @@ SERVICE_REFRESH_SCHEMA = vol.Schema(
|
|||
)
|
||||
|
||||
PLATFORMS = [Platform.SENSOR, Platform.SWITCH]
|
||||
AdGuardConfigEntry = ConfigEntry["AdGuardData"]
|
||||
type AdGuardConfigEntry = ConfigEntry[AdGuardData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -15,7 +15,7 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, Upda
|
|||
from .const import ADVANTAGE_AIR_RETRY
|
||||
from .models import AdvantageAirData
|
||||
|
||||
AdvantageAirDataConfigEntry = ConfigEntry[AdvantageAirData]
|
||||
type AdvantageAirDataConfigEntry = ConfigEntry[AdvantageAirData]
|
||||
|
||||
ADVANTAGE_AIR_SYNC_INTERVAL = 15
|
||||
PLATFORMS = [
|
||||
|
|
|
@ -17,7 +17,7 @@ from .coordinator import WeatherUpdateCoordinator
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
AemetConfigEntry = ConfigEntry["AemetData"]
|
||||
type AemetConfigEntry = ConfigEntry[AemetData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -12,7 +12,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
|||
|
||||
PLATFORMS: list[Platform] = [Platform.SENSOR]
|
||||
|
||||
AfterShipConfigEntry = ConfigEntry[AfterShip]
|
||||
type AfterShipConfigEntry = ConfigEntry[AfterShip]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: AfterShipConfigEntry) -> bool:
|
||||
|
|
|
@ -19,7 +19,7 @@ PLATFORMS = [Platform.SENSOR]
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
AirlyConfigEntry = ConfigEntry[AirlyDataUpdateCoordinator]
|
||||
type AirlyConfigEntry = ConfigEntry[AirlyDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: AirlyConfigEntry) -> bool:
|
||||
|
|
|
@ -21,7 +21,7 @@ from .coordinator import AirNowDataUpdateCoordinator
|
|||
_LOGGER = logging.getLogger(__name__)
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
AirNowConfigEntry = ConfigEntry[AirNowDataUpdateCoordinator]
|
||||
type AirNowConfigEntry = ConfigEntry[AirNowDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: AirNowConfigEntry) -> bool:
|
||||
|
|
|
@ -20,9 +20,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||
PLATFORMS: list[Platform] = [Platform.SENSOR]
|
||||
SCAN_INTERVAL = timedelta(minutes=6)
|
||||
|
||||
AirthingsDataCoordinatorType = DataUpdateCoordinator[dict[str, AirthingsDevice]]
|
||||
|
||||
AirthingsConfigEntry = ConfigEntry[AirthingsDataCoordinatorType]
|
||||
type AirthingsDataCoordinatorType = DataUpdateCoordinator[dict[str, AirthingsDevice]]
|
||||
type AirthingsConfigEntry = ConfigEntry[AirthingsDataCoordinatorType]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: AirthingsConfigEntry) -> bool:
|
||||
|
|
|
@ -13,7 +13,7 @@ from .const import DOMAIN
|
|||
|
||||
PLATFORMS: list[Platform] = [Platform.CLIMATE]
|
||||
|
||||
Airtouch5ConfigEntry = ConfigEntry[Airtouch5SimpleClient]
|
||||
type Airtouch5ConfigEntry = ConfigEntry[Airtouch5SimpleClient]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: Airtouch5ConfigEntry) -> bool:
|
||||
|
|
|
@ -38,7 +38,7 @@ PLATFORMS = [Platform.SENSOR]
|
|||
|
||||
UPDATE_INTERVAL = timedelta(minutes=1)
|
||||
|
||||
AirVisualProConfigEntry = ConfigEntry["AirVisualProData"]
|
||||
type AirVisualProConfigEntry = ConfigEntry[AirVisualProData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -39,7 +39,7 @@ DEFAULT_SOCKET_MIN_RETRY = 15
|
|||
|
||||
CONFIG_SCHEMA = cv.removed(DOMAIN, raise_if_present=False)
|
||||
|
||||
AmbientStationConfigEntry = ConfigEntry["AmbientStation"]
|
||||
type AmbientStationConfigEntry = ConfigEntry[AmbientStation]
|
||||
|
||||
|
||||
@callback
|
||||
|
|
|
@ -19,7 +19,7 @@ from .const import CONF_TRACKED_INTEGRATIONS
|
|||
from .coordinator import HomeassistantAnalyticsDataUpdateCoordinator
|
||||
|
||||
PLATFORMS: list[Platform] = [Platform.SENSOR]
|
||||
AnalyticsInsightsConfigEntry = ConfigEntry["AnalyticsInsightsData"]
|
||||
type AnalyticsInsightsConfigEntry = ConfigEntry[AnalyticsInsightsData]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
|
|
@ -73,7 +73,7 @@ DEVICE_EXCEPTIONS = (
|
|||
exceptions.DeviceIdMissingError,
|
||||
)
|
||||
|
||||
AppleTvConfigEntry = ConfigEntry["AppleTVManager"]
|
||||
type AppleTvConfigEntry = ConfigEntry[AppleTVManager]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: AppleTvConfigEntry) -> bool:
|
||||
|
|
|
@ -12,7 +12,7 @@ from .coordinator import ApSystemsDataCoordinator
|
|||
|
||||
PLATFORMS: list[Platform] = [Platform.SENSOR]
|
||||
|
||||
ApsystemsConfigEntry = ConfigEntry[ApSystemsDataCoordinator]
|
||||
type ApsystemsConfigEntry = ConfigEntry[ApSystemsDataCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ApsystemsConfigEntry) -> bool:
|
||||
|
|
|
@ -8,7 +8,7 @@ from .router import AsusWrtRouter
|
|||
|
||||
PLATFORMS = [Platform.DEVICE_TRACKER, Platform.SENSOR]
|
||||
|
||||
AsusWrtConfigEntry = ConfigEntry[AsusWrtRouter]
|
||||
type AsusWrtConfigEntry = ConfigEntry[AsusWrtRouter]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: AsusWrtConfigEntry) -> bool:
|
||||
|
|
|
@ -49,7 +49,7 @@ API_CACHED_ATTRS = {
|
|||
}
|
||||
YALEXS_BLE_DOMAIN = "yalexs_ble"
|
||||
|
||||
AugustConfigEntry = ConfigEntry["AugustData"]
|
||||
type AugustConfigEntry = ConfigEntry[AugustData]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
|
|
@ -8,7 +8,7 @@ from .coordinator import AuroraDataUpdateCoordinator
|
|||
|
||||
PLATFORMS = [Platform.BINARY_SENSOR, Platform.SENSOR]
|
||||
|
||||
AuroraConfigEntry = ConfigEntry[AuroraDataUpdateCoordinator]
|
||||
type AuroraConfigEntry = ConfigEntry[AuroraDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: AuroraConfigEntry) -> bool:
|
||||
|
|
|
@ -13,7 +13,7 @@ from .hub import AxisHub, get_axis_api
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
AxisConfigEntry = ConfigEntry[AxisHub]
|
||||
type AxisConfigEntry = ConfigEntry[AxisHub]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, config_entry: AxisConfigEntry) -> bool:
|
||||
|
|
|
@ -15,7 +15,7 @@ from homeassistant.exceptions import ConfigEntryNotReady
|
|||
|
||||
from .const import QUERY_INTERVAL, RUN_TIMEOUT
|
||||
|
||||
BAFConfigEntry = ConfigEntry[Device]
|
||||
type BAFConfigEntry = ConfigEntry[Device]
|
||||
|
||||
|
||||
PLATFORMS: list[Platform] = [
|
||||
|
|
|
@ -35,7 +35,7 @@ _API_TIMEOUT = SLOW_UPDATE_WARNING - 1
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BondConfigEntry = ConfigEntry[BondData]
|
||||
type BondConfigEntry = ConfigEntry[BondData]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: BondConfigEntry) -> bool:
|
||||
|
|
|
@ -24,7 +24,7 @@ PLATFORMS: list[Platform] = [Platform.TODO]
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
BringConfigEntry = ConfigEntry[BringDataUpdateCoordinator]
|
||||
type BringConfigEntry = ConfigEntry[BringDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: BringConfigEntry) -> bool:
|
||||
|
|
|
@ -15,7 +15,7 @@ from .utils import get_snmp_engine
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
BrotherConfigEntry = ConfigEntry[BrotherDataUpdateCoordinator]
|
||||
type BrotherConfigEntry = ConfigEntry[BrotherDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: BrotherConfigEntry) -> bool:
|
||||
|
|
|
@ -11,7 +11,7 @@ from .coordinator import CertExpiryDataUpdateCoordinator
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
CertExpiryConfigEntry = ConfigEntry[CertExpiryDataUpdateCoordinator]
|
||||
type CertExpiryConfigEntry = ConfigEntry[CertExpiryDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: CertExpiryConfigEntry) -> bool:
|
||||
|
|
|
@ -14,7 +14,7 @@ from .coordinator import CO2SignalCoordinator
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
CO2SignalConfigEntry = ConfigEntry[CO2SignalCoordinator]
|
||||
type CO2SignalConfigEntry = ConfigEntry[CO2SignalCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: CO2SignalConfigEntry) -> bool:
|
||||
|
|
|
@ -20,7 +20,7 @@ from homeassistant.helpers.device_registry import DeviceEntry
|
|||
|
||||
from .const import CONF_MYDEVOLO, DEFAULT_MYDEVOLO, GATEWAY_SERIAL_PATTERN, PLATFORMS
|
||||
|
||||
DevoloHomeControlConfigEntry = ConfigEntry[list[HomeControl]]
|
||||
type DevoloHomeControlConfigEntry = ConfigEntry[list[HomeControl]]
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
|
|
|
@ -49,7 +49,7 @@ from .const import (
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DevoloHomeNetworkConfigEntry = ConfigEntry["DevoloHomeNetworkData"]
|
||||
type DevoloHomeNetworkConfigEntry = ConfigEntry[DevoloHomeNetworkData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -16,7 +16,7 @@ from .coordinator import DiscovergyUpdateCoordinator
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
DiscovergyConfigEntry = ConfigEntry[list[DiscovergyUpdateCoordinator]]
|
||||
type DiscovergyConfigEntry = ConfigEntry[list[DiscovergyUpdateCoordinator]]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: DiscovergyConfigEntry) -> bool:
|
||||
|
|
|
@ -19,7 +19,7 @@ from .const import (
|
|||
from .exceptions import EntityNotFoundError
|
||||
from .util import get_position_data
|
||||
|
||||
DwdWeatherWarningsConfigEntry = ConfigEntry["DwdWeatherWarningsCoordinator"]
|
||||
type DwdWeatherWarningsConfigEntry = ConfigEntry[DwdWeatherWarningsCoordinator]
|
||||
|
||||
|
||||
class DwdWeatherWarningsCoordinator(DataUpdateCoordinator[None]):
|
||||
|
|
|
@ -37,7 +37,7 @@ PLATFORMS = [
|
|||
Platform.SWITCH,
|
||||
Platform.VACUUM,
|
||||
]
|
||||
EcovacsConfigEntry = ConfigEntry[EcovacsController]
|
||||
type EcovacsConfigEntry = ConfigEntry[EcovacsController]
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
|
|
|
@ -8,7 +8,7 @@ from .coordinator import ElgatoDataUpdateCoordinator
|
|||
|
||||
PLATFORMS = [Platform.BUTTON, Platform.LIGHT, Platform.SENSOR, Platform.SWITCH]
|
||||
|
||||
ElgatorConfigEntry = ConfigEntry[ElgatoDataUpdateCoordinator]
|
||||
type ElgatorConfigEntry = ConfigEntry[ElgatoDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ElgatorConfigEntry) -> bool:
|
||||
|
|
|
@ -69,7 +69,7 @@ from .discovery import (
|
|||
)
|
||||
from .models import ELKM1Data
|
||||
|
||||
ElkM1ConfigEntry = ConfigEntry[ELKM1Data]
|
||||
type ElkM1ConfigEntry = ConfigEntry[ELKM1Data]
|
||||
|
||||
SYNC_TIMEOUT = 120
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ from homeassistant.core import HomeAssistant
|
|||
from .const import PLATFORMS
|
||||
from .coordinator import FileSizeCoordinator
|
||||
|
||||
FileSizeConfigEntry = ConfigEntry[FileSizeCoordinator]
|
||||
type FileSizeConfigEntry = ConfigEntry[FileSizeCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: FileSizeConfigEntry) -> bool:
|
||||
|
|
|
@ -18,7 +18,7 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, Upda
|
|||
|
||||
from .const import DOMAIN, LOGGER
|
||||
|
||||
FritzboxConfigEntry = ConfigEntry["FritzboxDataUpdateCoordinator"]
|
||||
type FritzboxConfigEntry = ConfigEntry[FritzboxDataUpdateCoordinator]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -15,7 +15,7 @@ from .const import CONF_PHONEBOOK, CONF_PREFIXES, PLATFORMS
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
FritzBoxCallMonitorConfigEntry = ConfigEntry[FritzBoxPhonebook]
|
||||
type FritzBoxCallMonitorConfigEntry = ConfigEntry[FritzBoxPhonebook]
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
|
|
|
@ -41,7 +41,7 @@ PLATFORMS: Final = [Platform.SENSOR]
|
|||
|
||||
_FroniusCoordinatorT = TypeVar("_FroniusCoordinatorT", bound=FroniusCoordinatorBase)
|
||||
|
||||
FroniusConfigEntry = ConfigEntry["FroniusSolarNet"]
|
||||
type FroniusConfigEntry = ConfigEntry[FroniusSolarNet]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: FroniusConfigEntry) -> bool:
|
||||
|
|
|
@ -19,7 +19,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
GiosConfigEntry = ConfigEntry["GiosData"]
|
||||
type GiosConfigEntry = ConfigEntry[GiosData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -37,7 +37,7 @@ from .coordinator import HabiticaDataUpdateCoordinator
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
HabiticaConfigEntry = ConfigEntry[HabiticaDataUpdateCoordinator]
|
||||
type HabiticaConfigEntry = ConfigEntry[HabiticaDataUpdateCoordinator]
|
||||
|
||||
SENSORS_TYPES = ["name", "hp", "maxHealth", "mp", "maxMP", "exp", "toNextLevel", "lvl"]
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ PLATFORMS: list[Platform] = [Platform.BINARY_SENSOR, Platform.SENSOR]
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ImgwPibConfigEntry = ConfigEntry["ImgwPibData"]
|
||||
type ImgwPibConfigEntry = ConfigEntry[ImgwPibData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -17,7 +17,7 @@ from .coordinator import IPPDataUpdateCoordinator
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
IPPConfigEntry = ConfigEntry[IPPDataUpdateCoordinator]
|
||||
type IPPConfigEntry = ConfigEntry[IPPDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: IPPConfigEntry) -> bool:
|
||||
|
|
|
@ -17,7 +17,7 @@ PLATFORMS: list[Platform] = [Platform.TODO]
|
|||
|
||||
STORAGE_PATH = ".storage/local_todo.{key}.ics"
|
||||
|
||||
LocalTodoConfigEntry = ConfigEntry[LocalTodoListStore]
|
||||
type LocalTodoConfigEntry = ConfigEntry[LocalTodoListStore]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: LocalTodoConfigEntry) -> bool:
|
||||
|
|
|
@ -21,7 +21,7 @@ PLATFORMS = [Platform.WEATHER]
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
MetWeatherConfigEntry = ConfigEntry[MetDataUpdateCoordinator]
|
||||
type MetWeatherConfigEntry = ConfigEntry[MetDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
|
|
|
@ -28,7 +28,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
PLATFORMS = [Platform.BUTTON, Platform.SENSOR]
|
||||
|
||||
NAMConfigEntry = ConfigEntry[NAMDataUpdateCoordinator]
|
||||
type NAMConfigEntry = ConfigEntry[NAMDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: NAMConfigEntry) -> bool:
|
||||
|
|
|
@ -30,7 +30,7 @@ CONFIG_SCHEMA = cv.removed(DOMAIN, raise_if_present=False)
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
NextcloudConfigEntry = ConfigEntry[NextcloudDataUpdateCoordinator]
|
||||
type NextcloudConfigEntry = ConfigEntry[NextcloudDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: NextcloudConfigEntry) -> bool:
|
||||
|
|
|
@ -49,7 +49,7 @@ from .coordinator import (
|
|||
NextDnsUpdateCoordinator,
|
||||
)
|
||||
|
||||
NextDnsConfigEntry = ConfigEntry["NextDnsData"]
|
||||
type NextDnsConfigEntry = ConfigEntry[NextDnsData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -36,7 +36,7 @@ NUT_FAKE_SERIAL = ["unknown", "blank"]
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
NutConfigEntry = ConfigEntry["NutRuntimeData"]
|
||||
type NutConfigEntry = ConfigEntry[NutRuntimeData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -31,7 +31,7 @@ RETRY_STOP = datetime.timedelta(minutes=10)
|
|||
|
||||
DEBOUNCE_TIME = 10 * 60 # in seconds
|
||||
|
||||
NWSConfigEntry = ConfigEntry["NWSData"]
|
||||
type NWSConfigEntry = ConfigEntry[NWSData]
|
||||
|
||||
|
||||
def base_unique_id(latitude: float, longitude: float) -> str:
|
||||
|
|
|
@ -13,7 +13,7 @@ from .const import DOMAIN, PLATFORMS
|
|||
from .onewirehub import CannotConnect, OneWireHub
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
OneWireConfigEntry = ConfigEntry[OneWireHub]
|
||||
type OneWireConfigEntry = ConfigEntry[OneWireHub]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: OneWireConfigEntry) -> bool:
|
||||
|
|
|
@ -30,7 +30,7 @@ from .coordinator import WeatherUpdateCoordinator
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
OpenweathermapConfigEntry = ConfigEntry["OpenweathermapData"]
|
||||
type OpenweathermapConfigEntry = ConfigEntry[OpenweathermapData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -18,7 +18,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
PegelOnlineConfigEntry = ConfigEntry[PegelOnlineDataUpdateCoordinator]
|
||||
type PegelOnlineConfigEntry = ConfigEntry[PegelOnlineDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: PegelOnlineConfigEntry) -> bool:
|
||||
|
|
|
@ -42,7 +42,7 @@ PLATFORMS = [
|
|||
Platform.UPDATE,
|
||||
]
|
||||
|
||||
PiHoleConfigEntry = ConfigEntry["PiHoleData"]
|
||||
type PiHoleConfigEntry = ConfigEntry[PiHoleData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -12,7 +12,7 @@ from homeassistant.helpers import device_registry as dr, entity_registry as er
|
|||
from .const import DOMAIN, LOGGER, PLATFORMS
|
||||
from .coordinator import PlugwiseDataUpdateCoordinator
|
||||
|
||||
PlugwiseConfigEntry = ConfigEntry[PlugwiseDataUpdateCoordinator]
|
||||
type PlugwiseConfigEntry = ConfigEntry[PlugwiseDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: PlugwiseConfigEntry) -> bool:
|
||||
|
|
|
@ -11,7 +11,7 @@ from homeassistant.helpers import aiohttp_client
|
|||
|
||||
from .coordinator import PoolSenseDataUpdateCoordinator
|
||||
|
||||
PoolSenseConfigEntry = ConfigEntry[PoolSenseDataUpdateCoordinator]
|
||||
type PoolSenseConfigEntry = ConfigEntry[PoolSenseDataUpdateCoordinator]
|
||||
|
||||
PLATFORMS = [Platform.BINARY_SENSOR, Platform.SENSOR]
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ from .const import (
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ProximityConfigEntry = ConfigEntry["ProximityDataUpdateCoordinator"]
|
||||
type ProximityConfigEntry = ConfigEntry[ProximityDataUpdateCoordinator]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -11,7 +11,7 @@ from homeassistant.core import HomeAssistant
|
|||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
|
||||
RadioBrowserConfigEntry = ConfigEntry[RadioBrowser]
|
||||
type RadioBrowserConfigEntry = ConfigEntry[RadioBrowser]
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
|
|
|
@ -15,7 +15,7 @@ from .renault_hub import RenaultHub
|
|||
from .services import setup_services
|
||||
|
||||
CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
|
||||
RenaultConfigEntry = ConfigEntry[RenaultHub]
|
||||
type RenaultConfigEntry = ConfigEntry[RenaultHub]
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
|
|
|
@ -15,7 +15,7 @@ from .const import DOMAIN, LOGGER, PLATFORMS
|
|||
from .coordinator import SensiboDataUpdateCoordinator
|
||||
from .util import NoDevicesError, NoUsernameError, async_validate_api
|
||||
|
||||
SensiboConfigEntry = ConfigEntry["SensiboDataUpdateCoordinator"]
|
||||
type SensiboConfigEntry = ConfigEntry[SensiboDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: SensiboConfigEntry) -> bool:
|
||||
|
|
|
@ -84,7 +84,7 @@ class ShellyEntryData:
|
|||
rpc_poll: ShellyRpcPollingCoordinator | None = None
|
||||
|
||||
|
||||
ShellyConfigEntry = ConfigEntry[ShellyEntryData]
|
||||
type ShellyConfigEntry = ConfigEntry[ShellyEntryData]
|
||||
|
||||
|
||||
class ShellyCoordinatorBase(DataUpdateCoordinator[None], Generic[_DeviceT]):
|
||||
|
|
|
@ -16,7 +16,7 @@ from .coordinator import SpeedTestDataCoordinator
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
SpeedTestConfigEntry = ConfigEntry[SpeedTestDataCoordinator]
|
||||
type SpeedTestConfigEntry = ConfigEntry[SpeedTestDataCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
|
|
|
@ -31,7 +31,7 @@ from .const import (
|
|||
STATE_BELOW_HORIZON,
|
||||
)
|
||||
|
||||
SunConfigEntry = ConfigEntry["Sun"]
|
||||
type SunConfigEntry = ConfigEntry[Sun]
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
PLATFORMS = [Platform.BINARY_SENSOR, Platform.SENSOR]
|
||||
|
||||
SystemMonitorConfigEntry = ConfigEntry["SystemMonitorData"]
|
||||
type SystemMonitorConfigEntry = ConfigEntry[SystemMonitorData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -4,4 +4,4 @@ from homeassistant.config_entries import ConfigEntry
|
|||
|
||||
from .coordinator import TailwindDataUpdateCoordinator
|
||||
|
||||
TailwindConfigEntry = ConfigEntry[TailwindDataUpdateCoordinator]
|
||||
type TailwindConfigEntry = ConfigEntry[TailwindDataUpdateCoordinator]
|
||||
|
|
|
@ -28,7 +28,7 @@ from .const import CONF_FUEL_TYPES, CONF_STATIONS
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
TankerkoenigConfigEntry = ConfigEntry["TankerkoenigDataUpdateCoordinator"]
|
||||
type TankerkoenigConfigEntry = ConfigEntry[TankerkoenigDataUpdateCoordinator]
|
||||
|
||||
|
||||
class TankerkoenigDataUpdateCoordinator(DataUpdateCoordinator[dict[str, PriceInfo]]):
|
||||
|
|
|
@ -73,7 +73,7 @@ class TractiveData:
|
|||
trackables: list[Trackables]
|
||||
|
||||
|
||||
TractiveConfigEntry = ConfigEntry[TractiveData]
|
||||
type TractiveConfigEntry = ConfigEntry[TractiveData]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: TractiveConfigEntry) -> bool:
|
||||
|
|
|
@ -35,7 +35,7 @@ from .const import (
|
|||
# Suppress logs from the library, it logs unneeded on error
|
||||
logging.getLogger("tuya_sharing").setLevel(logging.CRITICAL)
|
||||
|
||||
TuyaConfigEntry = ConfigEntry["HomeAssistantTuyaData"]
|
||||
type TuyaConfigEntry = ConfigEntry[HomeAssistantTuyaData]
|
||||
|
||||
|
||||
class HomeAssistantTuyaData(NamedTuple):
|
||||
|
|
|
@ -23,8 +23,10 @@ SERVICE_SCHEMA = vol.Schema({vol.Optional(CONF_ID): cv.string})
|
|||
|
||||
PLATFORMS = [Platform.CALENDAR, Platform.SENSOR]
|
||||
|
||||
TwenteMilieuDataUpdateCoordinator = DataUpdateCoordinator[dict[WasteType, list[date]]]
|
||||
TwenteMilieuConfigEntry = ConfigEntry[TwenteMilieuDataUpdateCoordinator]
|
||||
type TwenteMilieuDataUpdateCoordinator = DataUpdateCoordinator[
|
||||
dict[WasteType, list[date]]
|
||||
]
|
||||
type TwenteMilieuConfigEntry = ConfigEntry[TwenteMilieuDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
|
|
@ -16,7 +16,7 @@ from .errors import AuthenticationRequired, CannotConnect
|
|||
from .hub import UnifiHub, get_unifi_api
|
||||
from .services import async_setup_services
|
||||
|
||||
UnifiConfigEntry = ConfigEntry[UnifiHub]
|
||||
type UnifiConfigEntry = ConfigEntry[UnifiHub]
|
||||
|
||||
SAVE_DELAY = 10
|
||||
STORAGE_KEY = "unifi_data"
|
||||
|
|
|
@ -36,7 +36,7 @@ PLATFORMS = [Platform.BINARY_SENSOR, Platform.SENSOR]
|
|||
|
||||
CONFIG_SCHEMA = cv.removed(DOMAIN, raise_if_present=False)
|
||||
|
||||
UpnpConfigEntry = ConfigEntry[UpnpDataUpdateCoordinator]
|
||||
type UpnpConfigEntry = ConfigEntry[UpnpDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: UpnpConfigEntry) -> bool:
|
||||
|
|
|
@ -14,7 +14,7 @@ from .const import LOGGER
|
|||
|
||||
PLATFORMS = [Platform.MEDIA_PLAYER]
|
||||
|
||||
VlcConfigEntry = ConfigEntry["VlcData"]
|
||||
type VlcConfigEntry = ConfigEntry[VlcData]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -8,7 +8,7 @@ from .coordinator import WebminUpdateCoordinator
|
|||
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
|
||||
WebminConfigEntry = ConfigEntry[WebminUpdateCoordinator]
|
||||
type WebminConfigEntry = ConfigEntry[WebminUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: WebminConfigEntry) -> bool:
|
||||
|
|
|
@ -59,7 +59,7 @@ PLATFORMS = [Platform.BINARY_SENSOR, Platform.CALENDAR, Platform.SENSOR]
|
|||
SUBSCRIBE_DELAY = timedelta(seconds=5)
|
||||
UNSUBSCRIBE_DELAY = timedelta(seconds=1)
|
||||
CONF_CLOUDHOOK_URL = "cloudhook_url"
|
||||
WithingsConfigEntry = ConfigEntry["WithingsData"]
|
||||
type WithingsConfigEntry = ConfigEntry[WithingsData]
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
|
|
|
@ -20,7 +20,7 @@ PLATFORMS = (
|
|||
Platform.UPDATE,
|
||||
)
|
||||
|
||||
WLEDConfigEntry = ConfigEntry[WLEDDataUpdateCoordinator]
|
||||
type WLEDConfigEntry = ConfigEntry[WLEDDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: WLEDConfigEntry) -> bool:
|
||||
|
|
|
@ -12,7 +12,7 @@ from homeassistant.helpers import entity_registry as er
|
|||
from .const import LOGGER, PLATFORMS
|
||||
from .coordinator import YaleDataUpdateCoordinator
|
||||
|
||||
YaleConfigEntry = ConfigEntry["YaleDataUpdateCoordinator"]
|
||||
type YaleConfigEntry = ConfigEntry[YaleDataUpdateCoordinator]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: YaleConfigEntry) -> bool:
|
||||
|
|
|
@ -29,7 +29,7 @@ from .const import (
|
|||
from .models import YaleXSBLEData
|
||||
from .util import async_find_existing_service_info, bluetooth_callback_matcher
|
||||
|
||||
YALEXSBLEConfigEntry = ConfigEntry[YaleXSBLEData]
|
||||
type YALEXSBLEConfigEntry = ConfigEntry[YaleXSBLEData]
|
||||
|
||||
|
||||
PLATFORMS: list[Platform] = [Platform.BINARY_SENSOR, Platform.LOCK, Platform.SENSOR]
|
||||
|
|
Loading…
Reference in New Issue