diff --git a/homeassistant/components/garadget/cover.py b/homeassistant/components/garadget/cover.py index 6d9705cee75..f168652b3cf 100644 --- a/homeassistant/components/garadget/cover.py +++ b/homeassistant/components/garadget/cover.py @@ -1,4 +1,5 @@ """Platform for the Garadget cover component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/garages_amsterdam/binary_sensor.py b/homeassistant/components/garages_amsterdam/binary_sensor.py index ad0630249aa..0aebe36baeb 100644 --- a/homeassistant/components/garages_amsterdam/binary_sensor.py +++ b/homeassistant/components/garages_amsterdam/binary_sensor.py @@ -1,4 +1,5 @@ """Binary Sensor platform for Garages Amsterdam.""" + from __future__ import annotations from homeassistant.components.binary_sensor import ( diff --git a/homeassistant/components/garages_amsterdam/config_flow.py b/homeassistant/components/garages_amsterdam/config_flow.py index c1f9acafc7e..6623ad5bd18 100644 --- a/homeassistant/components/garages_amsterdam/config_flow.py +++ b/homeassistant/components/garages_amsterdam/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Garages Amsterdam integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/garages_amsterdam/entity.py b/homeassistant/components/garages_amsterdam/entity.py index 45c85a101a9..671405235d4 100644 --- a/homeassistant/components/garages_amsterdam/entity.py +++ b/homeassistant/components/garages_amsterdam/entity.py @@ -1,4 +1,5 @@ """Generic entity for Garages Amsterdam.""" + from __future__ import annotations from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo diff --git a/homeassistant/components/garages_amsterdam/sensor.py b/homeassistant/components/garages_amsterdam/sensor.py index 48a3746a762..d17a8705275 100644 --- a/homeassistant/components/garages_amsterdam/sensor.py +++ b/homeassistant/components/garages_amsterdam/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for Garages Amsterdam.""" + from __future__ import annotations from homeassistant.components.sensor import SensorEntity diff --git a/homeassistant/components/gardena_bluetooth/__init__.py b/homeassistant/components/gardena_bluetooth/__init__.py index 99c8fa69acf..c2b3ae6732b 100644 --- a/homeassistant/components/gardena_bluetooth/__init__.py +++ b/homeassistant/components/gardena_bluetooth/__init__.py @@ -1,4 +1,5 @@ """The Gardena Bluetooth integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/gardena_bluetooth/binary_sensor.py b/homeassistant/components/gardena_bluetooth/binary_sensor.py index bf905bc551d..c552beaf878 100644 --- a/homeassistant/components/gardena_bluetooth/binary_sensor.py +++ b/homeassistant/components/gardena_bluetooth/binary_sensor.py @@ -1,4 +1,5 @@ """Support for binary_sensor entities.""" + from __future__ import annotations from dataclasses import dataclass, field diff --git a/homeassistant/components/gardena_bluetooth/button.py b/homeassistant/components/gardena_bluetooth/button.py index cbdbda5f367..bdcf9094f5c 100644 --- a/homeassistant/components/gardena_bluetooth/button.py +++ b/homeassistant/components/gardena_bluetooth/button.py @@ -1,4 +1,5 @@ """Support for button entities.""" + from __future__ import annotations from dataclasses import dataclass, field diff --git a/homeassistant/components/gardena_bluetooth/config_flow.py b/homeassistant/components/gardena_bluetooth/config_flow.py index 78e82f56e72..c7631b62f47 100644 --- a/homeassistant/components/gardena_bluetooth/config_flow.py +++ b/homeassistant/components/gardena_bluetooth/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Gardena Bluetooth integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/gardena_bluetooth/coordinator.py b/homeassistant/components/gardena_bluetooth/coordinator.py index 73552e25c03..7d939d27eb5 100644 --- a/homeassistant/components/gardena_bluetooth/coordinator.py +++ b/homeassistant/components/gardena_bluetooth/coordinator.py @@ -1,4 +1,5 @@ """Provides the DataUpdateCoordinator.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/gardena_bluetooth/number.py b/homeassistant/components/gardena_bluetooth/number.py index ef19a921041..cbc4866b0ff 100644 --- a/homeassistant/components/gardena_bluetooth/number.py +++ b/homeassistant/components/gardena_bluetooth/number.py @@ -1,4 +1,5 @@ """Support for number entities.""" + from __future__ import annotations from dataclasses import dataclass, field diff --git a/homeassistant/components/gardena_bluetooth/sensor.py b/homeassistant/components/gardena_bluetooth/sensor.py index ca2b1acdd8c..f2bddd3a91a 100644 --- a/homeassistant/components/gardena_bluetooth/sensor.py +++ b/homeassistant/components/gardena_bluetooth/sensor.py @@ -1,4 +1,5 @@ """Support for switch entities.""" + from __future__ import annotations from dataclasses import dataclass, field diff --git a/homeassistant/components/gardena_bluetooth/switch.py b/homeassistant/components/gardena_bluetooth/switch.py index bc83e3ed5a9..a57130c3acf 100644 --- a/homeassistant/components/gardena_bluetooth/switch.py +++ b/homeassistant/components/gardena_bluetooth/switch.py @@ -1,4 +1,5 @@ """Support for switch entities.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/gc100/binary_sensor.py b/homeassistant/components/gc100/binary_sensor.py index e750f928cf7..a03eae509d9 100644 --- a/homeassistant/components/gc100/binary_sensor.py +++ b/homeassistant/components/gc100/binary_sensor.py @@ -1,4 +1,5 @@ """Support for binary sensor using GC100.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/gc100/switch.py b/homeassistant/components/gc100/switch.py index d88b4c9fa79..ea90dde6abf 100644 --- a/homeassistant/components/gc100/switch.py +++ b/homeassistant/components/gc100/switch.py @@ -1,4 +1,5 @@ """Support for switches using GC100.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/gdacs/__init__.py b/homeassistant/components/gdacs/__init__.py index 0ec582f8d06..e96246b70bf 100644 --- a/homeassistant/components/gdacs/__init__.py +++ b/homeassistant/components/gdacs/__init__.py @@ -1,4 +1,5 @@ """The Global Disaster Alert and Coordination System (GDACS) integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/gdacs/const.py b/homeassistant/components/gdacs/const.py index 6be7e7b32fc..d1028ed2d08 100644 --- a/homeassistant/components/gdacs/const.py +++ b/homeassistant/components/gdacs/const.py @@ -1,4 +1,5 @@ """Define constants for the GDACS integration.""" + from datetime import timedelta from aio_georss_gdacs.consts import EVENT_TYPE_MAP diff --git a/homeassistant/components/gdacs/geo_location.py b/homeassistant/components/gdacs/geo_location.py index 5c4fb9d33bc..394c9086d71 100644 --- a/homeassistant/components/gdacs/geo_location.py +++ b/homeassistant/components/gdacs/geo_location.py @@ -1,4 +1,5 @@ """Geolocation support for GDACS Feed.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/gdacs/sensor.py b/homeassistant/components/gdacs/sensor.py index f660c8f73c8..90ea668ea3f 100644 --- a/homeassistant/components/gdacs/sensor.py +++ b/homeassistant/components/gdacs/sensor.py @@ -1,4 +1,5 @@ """Feed Entity Manager Sensor support for GDACS Feed.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/generic/__init__.py b/homeassistant/components/generic/__init__.py index 280b468add8..3de664dd734 100644 --- a/homeassistant/components/generic/__init__.py +++ b/homeassistant/components/generic/__init__.py @@ -1,4 +1,5 @@ """The generic component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/generic/camera.py b/homeassistant/components/generic/camera.py index cadc855ade6..80971760b85 100644 --- a/homeassistant/components/generic/camera.py +++ b/homeassistant/components/generic/camera.py @@ -1,4 +1,5 @@ """Support for IP Cameras.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/generic/config_flow.py b/homeassistant/components/generic/config_flow.py index b5bbd79def1..0964e7f2b29 100644 --- a/homeassistant/components/generic/config_flow.py +++ b/homeassistant/components/generic/config_flow.py @@ -1,4 +1,5 @@ """Config flow for generic (IP Camera).""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/generic/diagnostics.py b/homeassistant/components/generic/diagnostics.py index 39d6a81ad88..e5bf4294e4a 100644 --- a/homeassistant/components/generic/diagnostics.py +++ b/homeassistant/components/generic/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for generic (IP camera).""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/generic_hygrostat/humidifier.py b/homeassistant/components/generic_hygrostat/humidifier.py index d69a8a968c7..fea00d5cc8b 100644 --- a/homeassistant/components/generic_hygrostat/humidifier.py +++ b/homeassistant/components/generic_hygrostat/humidifier.py @@ -1,4 +1,5 @@ """Adds support for generic hygrostat units.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/generic_thermostat/climate.py b/homeassistant/components/generic_thermostat/climate.py index 64fde0dfd26..af082004f39 100644 --- a/homeassistant/components/generic_thermostat/climate.py +++ b/homeassistant/components/generic_thermostat/climate.py @@ -1,4 +1,5 @@ """Adds support for generic thermostat units.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/geniushub/__init__.py b/homeassistant/components/geniushub/__init__.py index 955c76fe0fc..5fc21a3e5b4 100644 --- a/homeassistant/components/geniushub/__init__.py +++ b/homeassistant/components/geniushub/__init__.py @@ -1,4 +1,5 @@ """Support for a Genius Hub system.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/geniushub/binary_sensor.py b/homeassistant/components/geniushub/binary_sensor.py index a2f71bfd9fe..f078bb4b363 100644 --- a/homeassistant/components/geniushub/binary_sensor.py +++ b/homeassistant/components/geniushub/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Genius Hub binary_sensor devices.""" + from __future__ import annotations from homeassistant.components.binary_sensor import BinarySensorEntity diff --git a/homeassistant/components/geniushub/climate.py b/homeassistant/components/geniushub/climate.py index cb817c64930..02038ced198 100644 --- a/homeassistant/components/geniushub/climate.py +++ b/homeassistant/components/geniushub/climate.py @@ -1,4 +1,5 @@ """Support for Genius Hub climate devices.""" + from __future__ import annotations from homeassistant.components.climate import ( diff --git a/homeassistant/components/geniushub/sensor.py b/homeassistant/components/geniushub/sensor.py index 22d95be079e..998bd6f1edb 100644 --- a/homeassistant/components/geniushub/sensor.py +++ b/homeassistant/components/geniushub/sensor.py @@ -1,4 +1,5 @@ """Support for Genius Hub sensor devices.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/geniushub/switch.py b/homeassistant/components/geniushub/switch.py index 7b9bf8f6112..b703df57f90 100644 --- a/homeassistant/components/geniushub/switch.py +++ b/homeassistant/components/geniushub/switch.py @@ -1,4 +1,5 @@ """Support for Genius Hub switch/outlet devices.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/geniushub/water_heater.py b/homeassistant/components/geniushub/water_heater.py index f8cf7288e57..6c3b5223ef9 100644 --- a/homeassistant/components/geniushub/water_heater.py +++ b/homeassistant/components/geniushub/water_heater.py @@ -1,4 +1,5 @@ """Support for Genius Hub water_heater devices.""" + from __future__ import annotations from homeassistant.components.water_heater import ( diff --git a/homeassistant/components/geo_json_events/__init__.py b/homeassistant/components/geo_json_events/__init__.py index 64b589f4f90..a50f7e432d9 100644 --- a/homeassistant/components/geo_json_events/__init__.py +++ b/homeassistant/components/geo_json_events/__init__.py @@ -1,4 +1,5 @@ """The GeoJSON events component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/geo_json_events/config_flow.py b/homeassistant/components/geo_json_events/config_flow.py index 2eb3443b3e5..65e5d2b1c75 100644 --- a/homeassistant/components/geo_json_events/config_flow.py +++ b/homeassistant/components/geo_json_events/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the GeoJSON events integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/geo_json_events/const.py b/homeassistant/components/geo_json_events/const.py index 15f8b0a5b84..679e8f2e565 100644 --- a/homeassistant/components/geo_json_events/const.py +++ b/homeassistant/components/geo_json_events/const.py @@ -1,4 +1,5 @@ """Define constants for the GeoJSON events integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/geo_json_events/geo_location.py b/homeassistant/components/geo_json_events/geo_location.py index 134f6a0e943..e0067bcfdc9 100644 --- a/homeassistant/components/geo_json_events/geo_location.py +++ b/homeassistant/components/geo_json_events/geo_location.py @@ -1,4 +1,5 @@ """Support for generic GeoJSON events.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/geo_json_events/manager.py b/homeassistant/components/geo_json_events/manager.py index 93f74831ecb..deff15436a6 100644 --- a/homeassistant/components/geo_json_events/manager.py +++ b/homeassistant/components/geo_json_events/manager.py @@ -1,4 +1,5 @@ """Entity manager for generic GeoJSON events.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/geo_location/__init__.py b/homeassistant/components/geo_location/__init__.py index c5e91d32b20..d81fab65dc9 100644 --- a/homeassistant/components/geo_location/__init__.py +++ b/homeassistant/components/geo_location/__init__.py @@ -1,4 +1,5 @@ """Support for Geolocation.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/geo_location/trigger.py b/homeassistant/components/geo_location/trigger.py index f4ed94f1cf4..bb63440836f 100644 --- a/homeassistant/components/geo_location/trigger.py +++ b/homeassistant/components/geo_location/trigger.py @@ -1,4 +1,5 @@ """Offer geolocation automation rules.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/geo_rss_events/sensor.py b/homeassistant/components/geo_rss_events/sensor.py index 3e6a0923886..d64c08a6917 100644 --- a/homeassistant/components/geo_rss_events/sensor.py +++ b/homeassistant/components/geo_rss_events/sensor.py @@ -4,6 +4,7 @@ Retrieves current events (typically incidents or alerts) in GeoRSS format, and shows information on events filtered by distance to the HA instance's location and grouped by category. """ + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/geocaching/config_flow.py b/homeassistant/components/geocaching/config_flow.py index f8b2391afba..05676cc346e 100644 --- a/homeassistant/components/geocaching/config_flow.py +++ b/homeassistant/components/geocaching/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Geocaching.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/geocaching/const.py b/homeassistant/components/geocaching/const.py index 13b42b318c0..8c255f5452a 100644 --- a/homeassistant/components/geocaching/const.py +++ b/homeassistant/components/geocaching/const.py @@ -1,4 +1,5 @@ """Constants for the Geocaching integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/geocaching/coordinator.py b/homeassistant/components/geocaching/coordinator.py index f02cccf544b..8f56cd9d846 100644 --- a/homeassistant/components/geocaching/coordinator.py +++ b/homeassistant/components/geocaching/coordinator.py @@ -1,4 +1,5 @@ """Provides the Geocaching DataUpdateCoordinator.""" + from __future__ import annotations from geocachingapi.exceptions import GeocachingApiError diff --git a/homeassistant/components/geocaching/models.py b/homeassistant/components/geocaching/models.py index 60ee4e05978..3ddea00217f 100644 --- a/homeassistant/components/geocaching/models.py +++ b/homeassistant/components/geocaching/models.py @@ -1,4 +1,5 @@ """Models for the Geocaching integration.""" + from typing import TypedDict diff --git a/homeassistant/components/geocaching/oauth.py b/homeassistant/components/geocaching/oauth.py index 848c4fce66c..c872f9a7522 100644 --- a/homeassistant/components/geocaching/oauth.py +++ b/homeassistant/components/geocaching/oauth.py @@ -1,4 +1,5 @@ """oAuth2 functions and classes for Geocaching API integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/geocaching/sensor.py b/homeassistant/components/geocaching/sensor.py index 91f7addae44..4065f199285 100644 --- a/homeassistant/components/geocaching/sensor.py +++ b/homeassistant/components/geocaching/sensor.py @@ -1,4 +1,5 @@ """Platform for sensor integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/geofency/__init__.py b/homeassistant/components/geofency/__init__.py index 2e6ed8429dd..547d7bdb5bc 100644 --- a/homeassistant/components/geofency/__init__.py +++ b/homeassistant/components/geofency/__init__.py @@ -1,4 +1,5 @@ """Support for Geofency.""" + from http import HTTPStatus from aiohttp import web diff --git a/homeassistant/components/geofency/config_flow.py b/homeassistant/components/geofency/config_flow.py index 2d8bce86d74..e51ef86b0cc 100644 --- a/homeassistant/components/geofency/config_flow.py +++ b/homeassistant/components/geofency/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Geofency.""" + from homeassistant.helpers import config_entry_flow from .const import DOMAIN diff --git a/homeassistant/components/geofency/device_tracker.py b/homeassistant/components/geofency/device_tracker.py index f0159915d32..eff937a2170 100644 --- a/homeassistant/components/geofency/device_tracker.py +++ b/homeassistant/components/geofency/device_tracker.py @@ -1,4 +1,5 @@ """Support for the Geofency device tracker platform.""" + from homeassistant.components.device_tracker import SourceType, TrackerEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE diff --git a/homeassistant/components/geonetnz_quakes/__init__.py b/homeassistant/components/geonetnz_quakes/__init__.py index dfe51f3119e..b9443d4aed8 100644 --- a/homeassistant/components/geonetnz_quakes/__init__.py +++ b/homeassistant/components/geonetnz_quakes/__init__.py @@ -1,4 +1,5 @@ """The GeoNet NZ Quakes integration.""" + from datetime import timedelta import logging diff --git a/homeassistant/components/geonetnz_quakes/const.py b/homeassistant/components/geonetnz_quakes/const.py index 6ec2199f9e4..db529a17fbe 100644 --- a/homeassistant/components/geonetnz_quakes/const.py +++ b/homeassistant/components/geonetnz_quakes/const.py @@ -1,4 +1,5 @@ """Define constants for the GeoNet NZ Quakes integration.""" + from datetime import timedelta from homeassistant.const import Platform diff --git a/homeassistant/components/geonetnz_quakes/geo_location.py b/homeassistant/components/geonetnz_quakes/geo_location.py index 6fa84f590f1..f3458d96a18 100644 --- a/homeassistant/components/geonetnz_quakes/geo_location.py +++ b/homeassistant/components/geonetnz_quakes/geo_location.py @@ -1,4 +1,5 @@ """Geolocation support for GeoNet NZ Quakes Feeds.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/geonetnz_quakes/sensor.py b/homeassistant/components/geonetnz_quakes/sensor.py index e69ba6eb005..020b76a6c97 100644 --- a/homeassistant/components/geonetnz_quakes/sensor.py +++ b/homeassistant/components/geonetnz_quakes/sensor.py @@ -1,4 +1,5 @@ """Feed Entity Manager Sensor support for GeoNet NZ Quakes Feeds.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/geonetnz_volcano/__init__.py b/homeassistant/components/geonetnz_volcano/__init__.py index fb7770a5461..b08d6d62c55 100644 --- a/homeassistant/components/geonetnz_volcano/__init__.py +++ b/homeassistant/components/geonetnz_volcano/__init__.py @@ -1,4 +1,5 @@ """The GeoNet NZ Volcano integration.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/geonetnz_volcano/const.py b/homeassistant/components/geonetnz_volcano/const.py index 8c17ff42544..be04a25d27a 100644 --- a/homeassistant/components/geonetnz_volcano/const.py +++ b/homeassistant/components/geonetnz_volcano/const.py @@ -1,4 +1,5 @@ """Define constants for the GeoNet NZ Volcano integration.""" + from datetime import timedelta from homeassistant.const import Platform diff --git a/homeassistant/components/geonetnz_volcano/sensor.py b/homeassistant/components/geonetnz_volcano/sensor.py index f02e076b66c..6197577b56c 100644 --- a/homeassistant/components/geonetnz_volcano/sensor.py +++ b/homeassistant/components/geonetnz_volcano/sensor.py @@ -1,4 +1,5 @@ """Feed Entity Manager Sensor support for GeoNet NZ Volcano Feeds.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/gios/__init__.py b/homeassistant/components/gios/__init__.py index 88c505fc4ae..5810a32f80f 100644 --- a/homeassistant/components/gios/__init__.py +++ b/homeassistant/components/gios/__init__.py @@ -1,4 +1,5 @@ """The GIOS component.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/gios/config_flow.py b/homeassistant/components/gios/config_flow.py index bad7c37eebd..a089aeab820 100644 --- a/homeassistant/components/gios/config_flow.py +++ b/homeassistant/components/gios/config_flow.py @@ -1,4 +1,5 @@ """Adds config flow for GIOS.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/gios/const.py b/homeassistant/components/gios/const.py index 33ddfae6fe1..a8490511ab8 100644 --- a/homeassistant/components/gios/const.py +++ b/homeassistant/components/gios/const.py @@ -1,4 +1,5 @@ """Constants for GIOS integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/gios/diagnostics.py b/homeassistant/components/gios/diagnostics.py index 954580d5c3f..1cdd9299a1c 100644 --- a/homeassistant/components/gios/diagnostics.py +++ b/homeassistant/components/gios/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for GIOS.""" + from __future__ import annotations from dataclasses import asdict diff --git a/homeassistant/components/gios/sensor.py b/homeassistant/components/gios/sensor.py index 1b13430128f..f097a14c943 100644 --- a/homeassistant/components/gios/sensor.py +++ b/homeassistant/components/gios/sensor.py @@ -1,4 +1,5 @@ """Support for the GIOS service.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/gios/system_health.py b/homeassistant/components/gios/system_health.py index 589dc428bcb..46fe78556e2 100644 --- a/homeassistant/components/gios/system_health.py +++ b/homeassistant/components/gios/system_health.py @@ -1,4 +1,5 @@ """Provide info to system health.""" + from __future__ import annotations from typing import Any, Final diff --git a/homeassistant/components/github/__init__.py b/homeassistant/components/github/__init__.py index 725c319dd58..20706c1acbc 100644 --- a/homeassistant/components/github/__init__.py +++ b/homeassistant/components/github/__init__.py @@ -1,4 +1,5 @@ """The GitHub integration.""" + from __future__ import annotations from aiogithubapi import GitHubAPI diff --git a/homeassistant/components/github/config_flow.py b/homeassistant/components/github/config_flow.py index 36f1b19eea7..2d9440928e3 100644 --- a/homeassistant/components/github/config_flow.py +++ b/homeassistant/components/github/config_flow.py @@ -1,4 +1,5 @@ """Config flow for GitHub integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/github/const.py b/homeassistant/components/github/const.py index d01656ee8ae..df44860b780 100644 --- a/homeassistant/components/github/const.py +++ b/homeassistant/components/github/const.py @@ -1,4 +1,5 @@ """Constants for the GitHub integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/github/coordinator.py b/homeassistant/components/github/coordinator.py index 45ab055aa9a..e73e02932e9 100644 --- a/homeassistant/components/github/coordinator.py +++ b/homeassistant/components/github/coordinator.py @@ -1,4 +1,5 @@ """Custom data update coordinator for the GitHub integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/github/diagnostics.py b/homeassistant/components/github/diagnostics.py index 15626497344..37313be3690 100644 --- a/homeassistant/components/github/diagnostics.py +++ b/homeassistant/components/github/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for the GitHub integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/github/sensor.py b/homeassistant/components/github/sensor.py index cec0e6b763f..2d373de56ea 100644 --- a/homeassistant/components/github/sensor.py +++ b/homeassistant/components/github/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for the GitHub integration.""" + from __future__ import annotations from collections.abc import Callable, Mapping diff --git a/homeassistant/components/gitlab_ci/sensor.py b/homeassistant/components/gitlab_ci/sensor.py index ed0db5416c1..d247ef5af60 100644 --- a/homeassistant/components/gitlab_ci/sensor.py +++ b/homeassistant/components/gitlab_ci/sensor.py @@ -1,4 +1,5 @@ """Sensor for retrieving latest GitLab CI job information.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/gitter/sensor.py b/homeassistant/components/gitter/sensor.py index db5b189d5ea..056c275c785 100644 --- a/homeassistant/components/gitter/sensor.py +++ b/homeassistant/components/gitter/sensor.py @@ -1,4 +1,5 @@ """Support for displaying details about a Gitter.im chat room.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/glances/config_flow.py b/homeassistant/components/glances/config_flow.py index 9fcf25aae0d..9208a4b0ebd 100644 --- a/homeassistant/components/glances/config_flow.py +++ b/homeassistant/components/glances/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Glances.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/glances/sensor.py b/homeassistant/components/glances/sensor.py index f3718dc4c0e..35350e863fa 100644 --- a/homeassistant/components/glances/sensor.py +++ b/homeassistant/components/glances/sensor.py @@ -1,4 +1,5 @@ """Support gathering system information of hosts which are running glances.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/goalzero/__init__.py b/homeassistant/components/goalzero/__init__.py index 7a7000ba780..60b0338c258 100644 --- a/homeassistant/components/goalzero/__init__.py +++ b/homeassistant/components/goalzero/__init__.py @@ -1,4 +1,5 @@ """The Goal Zero Yeti integration.""" + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/homeassistant/components/goalzero/binary_sensor.py b/homeassistant/components/goalzero/binary_sensor.py index 9464067d426..eec8773db30 100644 --- a/homeassistant/components/goalzero/binary_sensor.py +++ b/homeassistant/components/goalzero/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Goal Zero Yeti Sensors.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/goalzero/config_flow.py b/homeassistant/components/goalzero/config_flow.py index e4d997d41f6..c276db135fa 100644 --- a/homeassistant/components/goalzero/config_flow.py +++ b/homeassistant/components/goalzero/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Goal Zero Yeti integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/goalzero/sensor.py b/homeassistant/components/goalzero/sensor.py index b9a83453d7f..86f8bc9455b 100644 --- a/homeassistant/components/goalzero/sensor.py +++ b/homeassistant/components/goalzero/sensor.py @@ -1,4 +1,5 @@ """Support for Goal Zero Yeti Sensors.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/goalzero/switch.py b/homeassistant/components/goalzero/switch.py index 30680c6ff72..9c0aee03b83 100644 --- a/homeassistant/components/goalzero/switch.py +++ b/homeassistant/components/goalzero/switch.py @@ -1,4 +1,5 @@ """Support for Goal Zero Yeti Switches.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/gogogate2/common.py b/homeassistant/components/gogogate2/common.py index 093c93699ff..01834187c70 100644 --- a/homeassistant/components/gogogate2/common.py +++ b/homeassistant/components/gogogate2/common.py @@ -1,4 +1,5 @@ """Common code for GogoGate2 component.""" + from __future__ import annotations from collections.abc import Awaitable, Callable, Mapping diff --git a/homeassistant/components/gogogate2/config_flow.py b/homeassistant/components/gogogate2/config_flow.py index d0a63260107..96ab97f5ba5 100644 --- a/homeassistant/components/gogogate2/config_flow.py +++ b/homeassistant/components/gogogate2/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Gogogate2.""" + from __future__ import annotations import dataclasses diff --git a/homeassistant/components/gogogate2/cover.py b/homeassistant/components/gogogate2/cover.py index f0039d85295..17cfebe4a70 100644 --- a/homeassistant/components/gogogate2/cover.py +++ b/homeassistant/components/gogogate2/cover.py @@ -1,4 +1,5 @@ """Support for Gogogate2 garage Doors.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/gogogate2/sensor.py b/homeassistant/components/gogogate2/sensor.py index 9100137843a..c67b7f371e2 100644 --- a/homeassistant/components/gogogate2/sensor.py +++ b/homeassistant/components/gogogate2/sensor.py @@ -1,4 +1,5 @@ """Support for Gogogate2 garage Doors.""" + from __future__ import annotations from itertools import chain diff --git a/homeassistant/components/goodwe/button.py b/homeassistant/components/goodwe/button.py index f551e09fc6a..62d9151061b 100644 --- a/homeassistant/components/goodwe/button.py +++ b/homeassistant/components/goodwe/button.py @@ -1,4 +1,5 @@ """GoodWe PV inverter selection settings entities.""" + from collections.abc import Awaitable, Callable from dataclasses import dataclass from datetime import datetime diff --git a/homeassistant/components/goodwe/config_flow.py b/homeassistant/components/goodwe/config_flow.py index 7e87f0307c8..d6a3be7e56a 100644 --- a/homeassistant/components/goodwe/config_flow.py +++ b/homeassistant/components/goodwe/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure Goodwe inverters using their local API.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/goodwe/const.py b/homeassistant/components/goodwe/const.py index c5dbaaa49e5..730433c4a66 100644 --- a/homeassistant/components/goodwe/const.py +++ b/homeassistant/components/goodwe/const.py @@ -1,4 +1,5 @@ """Constants for the Goodwe component.""" + from datetime import timedelta from homeassistant.const import Platform diff --git a/homeassistant/components/goodwe/coordinator.py b/homeassistant/components/goodwe/coordinator.py index ac91fba787d..a8ee7df6337 100644 --- a/homeassistant/components/goodwe/coordinator.py +++ b/homeassistant/components/goodwe/coordinator.py @@ -1,4 +1,5 @@ """Update coordinator for Goodwe.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/goodwe/diagnostics.py b/homeassistant/components/goodwe/diagnostics.py index 285036c0254..600f02b9b7e 100644 --- a/homeassistant/components/goodwe/diagnostics.py +++ b/homeassistant/components/goodwe/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Goodwe.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/goodwe/number.py b/homeassistant/components/goodwe/number.py index 09e056da607..8bdcf13ae53 100644 --- a/homeassistant/components/goodwe/number.py +++ b/homeassistant/components/goodwe/number.py @@ -1,4 +1,5 @@ """GoodWe PV inverter numeric settings entities.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/goodwe/sensor.py b/homeassistant/components/goodwe/sensor.py index a43ff971a9a..795b26a0c9f 100644 --- a/homeassistant/components/goodwe/sensor.py +++ b/homeassistant/components/goodwe/sensor.py @@ -1,4 +1,5 @@ """Support for GoodWe inverter via UDP.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/google/__init__.py b/homeassistant/components/google/__init__.py index e05a6f6fb97..9bb6dbd059f 100644 --- a/homeassistant/components/google/__init__.py +++ b/homeassistant/components/google/__init__.py @@ -1,4 +1,5 @@ """Support for Google - Calendar Event Devices.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/google/config_flow.py b/homeassistant/components/google/config_flow.py index cc6810df216..6207303c8a6 100644 --- a/homeassistant/components/google/config_flow.py +++ b/homeassistant/components/google/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Google integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/google/const.py b/homeassistant/components/google/const.py index 6f497543b2d..1e0b2fc910b 100644 --- a/homeassistant/components/google/const.py +++ b/homeassistant/components/google/const.py @@ -1,4 +1,5 @@ """Constants for google integration.""" + from __future__ import annotations from enum import Enum, StrEnum diff --git a/homeassistant/components/google_assistant/__init__.py b/homeassistant/components/google_assistant/__init__.py index 37f3a2c3edc..eb71361672a 100644 --- a/homeassistant/components/google_assistant/__init__.py +++ b/homeassistant/components/google_assistant/__init__.py @@ -1,4 +1,5 @@ """Support for Actions on Google Assistant Smart Home Control.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/google_assistant/button.py b/homeassistant/components/google_assistant/button.py index 139e3032f14..cf3a42e251b 100644 --- a/homeassistant/components/google_assistant/button.py +++ b/homeassistant/components/google_assistant/button.py @@ -1,4 +1,5 @@ """Support for buttons.""" + from __future__ import annotations from homeassistant import config_entries diff --git a/homeassistant/components/google_assistant/const.py b/homeassistant/components/google_assistant/const.py index 431433e2bba..e97d8108965 100644 --- a/homeassistant/components/google_assistant/const.py +++ b/homeassistant/components/google_assistant/const.py @@ -1,4 +1,5 @@ """Constants for Google Assistant.""" + from homeassistant.components import ( alarm_control_panel, binary_sensor, diff --git a/homeassistant/components/google_assistant/data_redaction.py b/homeassistant/components/google_assistant/data_redaction.py index 6a187113bb9..50bd6dabf4c 100644 --- a/homeassistant/components/google_assistant/data_redaction.py +++ b/homeassistant/components/google_assistant/data_redaction.py @@ -1,4 +1,5 @@ """Helpers to redact Google Assistant data when logging.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/google_assistant/diagnostics.py b/homeassistant/components/google_assistant/diagnostics.py index fd4347ddd2c..48902147b05 100644 --- a/homeassistant/components/google_assistant/diagnostics.py +++ b/homeassistant/components/google_assistant/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Hue.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/google_assistant/error.py b/homeassistant/components/google_assistant/error.py index 82c256067eb..24d6b497103 100644 --- a/homeassistant/components/google_assistant/error.py +++ b/homeassistant/components/google_assistant/error.py @@ -1,4 +1,5 @@ """Errors for Google Assistant.""" + from .const import ERR_CHALLENGE_NEEDED diff --git a/homeassistant/components/google_assistant/helpers.py b/homeassistant/components/google_assistant/helpers.py index 28479fd1e97..480a7e73d8b 100644 --- a/homeassistant/components/google_assistant/helpers.py +++ b/homeassistant/components/google_assistant/helpers.py @@ -1,4 +1,5 @@ """Helper classes for Google Assistant integration.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/google_assistant/http.py b/homeassistant/components/google_assistant/http.py index 20e9c3bf842..580d0e4a749 100644 --- a/homeassistant/components/google_assistant/http.py +++ b/homeassistant/components/google_assistant/http.py @@ -1,4 +1,5 @@ """Support for Google Actions Smart Home Control.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/google_assistant/logbook.py b/homeassistant/components/google_assistant/logbook.py index 9559188cbd2..686b11b63b5 100644 --- a/homeassistant/components/google_assistant/logbook.py +++ b/homeassistant/components/google_assistant/logbook.py @@ -1,4 +1,5 @@ """Describe logbook events.""" + from homeassistant.components.logbook import LOGBOOK_ENTRY_MESSAGE, LOGBOOK_ENTRY_NAME from homeassistant.core import callback diff --git a/homeassistant/components/google_assistant/report_state.py b/homeassistant/components/google_assistant/report_state.py index aec50011200..26a341bd7b6 100644 --- a/homeassistant/components/google_assistant/report_state.py +++ b/homeassistant/components/google_assistant/report_state.py @@ -1,4 +1,5 @@ """Google Report State implementation.""" + from __future__ import annotations from collections import deque diff --git a/homeassistant/components/google_assistant/trait.py b/homeassistant/components/google_assistant/trait.py index 169fa30386d..bf68ebd758c 100644 --- a/homeassistant/components/google_assistant/trait.py +++ b/homeassistant/components/google_assistant/trait.py @@ -1,4 +1,5 @@ """Implement the Google Smart Home traits.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/google_assistant_sdk/__init__.py b/homeassistant/components/google_assistant_sdk/__init__.py index f77931b8d89..7d8653b509d 100644 --- a/homeassistant/components/google_assistant_sdk/__init__.py +++ b/homeassistant/components/google_assistant_sdk/__init__.py @@ -1,4 +1,5 @@ """Support for Google Assistant SDK.""" + from __future__ import annotations import dataclasses diff --git a/homeassistant/components/google_assistant_sdk/application_credentials.py b/homeassistant/components/google_assistant_sdk/application_credentials.py index c8a7922bc7a..8fa99157479 100644 --- a/homeassistant/components/google_assistant_sdk/application_credentials.py +++ b/homeassistant/components/google_assistant_sdk/application_credentials.py @@ -1,4 +1,5 @@ """application_credentials platform for Google Assistant SDK.""" + from homeassistant.components.application_credentials import AuthorizationServer from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/google_assistant_sdk/config_flow.py b/homeassistant/components/google_assistant_sdk/config_flow.py index 3813abb9b3a..85dfd974b22 100644 --- a/homeassistant/components/google_assistant_sdk/config_flow.py +++ b/homeassistant/components/google_assistant_sdk/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Google Assistant SDK integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/google_assistant_sdk/const.py b/homeassistant/components/google_assistant_sdk/const.py index d63aec0ebd5..4059f006d4b 100644 --- a/homeassistant/components/google_assistant_sdk/const.py +++ b/homeassistant/components/google_assistant_sdk/const.py @@ -1,4 +1,5 @@ """Constants for Google Assistant SDK integration.""" + from typing import Final DOMAIN: Final = "google_assistant_sdk" diff --git a/homeassistant/components/google_assistant_sdk/helpers.py b/homeassistant/components/google_assistant_sdk/helpers.py index a55ff92afe6..0c4d081961f 100644 --- a/homeassistant/components/google_assistant_sdk/helpers.py +++ b/homeassistant/components/google_assistant_sdk/helpers.py @@ -1,4 +1,5 @@ """Helper classes for Google Assistant SDK integration.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/google_assistant_sdk/notify.py b/homeassistant/components/google_assistant_sdk/notify.py index adcd07a0cda..5592f22ffeb 100644 --- a/homeassistant/components/google_assistant_sdk/notify.py +++ b/homeassistant/components/google_assistant_sdk/notify.py @@ -1,4 +1,5 @@ """Support for Google Assistant SDK broadcast notifications.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/google_generative_ai_conversation/__init__.py b/homeassistant/components/google_generative_ai_conversation/__init__.py index 73450e9f5b9..e956c288b53 100644 --- a/homeassistant/components/google_generative_ai_conversation/__init__.py +++ b/homeassistant/components/google_generative_ai_conversation/__init__.py @@ -1,4 +1,5 @@ """The Google Generative AI Conversation integration.""" + from __future__ import annotations from functools import partial diff --git a/homeassistant/components/google_generative_ai_conversation/config_flow.py b/homeassistant/components/google_generative_ai_conversation/config_flow.py index e386e924a7b..dde82db91cc 100644 --- a/homeassistant/components/google_generative_ai_conversation/config_flow.py +++ b/homeassistant/components/google_generative_ai_conversation/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Google Generative AI Conversation integration.""" + from __future__ import annotations from functools import partial diff --git a/homeassistant/components/google_mail/__init__.py b/homeassistant/components/google_mail/__init__.py index 311af064fcd..1ac963b430a 100644 --- a/homeassistant/components/google_mail/__init__.py +++ b/homeassistant/components/google_mail/__init__.py @@ -1,4 +1,5 @@ """Support for Google Mail.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry, ConfigEntryState diff --git a/homeassistant/components/google_mail/api.py b/homeassistant/components/google_mail/api.py index 10b2fec7467..e824e4b3ddd 100644 --- a/homeassistant/components/google_mail/api.py +++ b/homeassistant/components/google_mail/api.py @@ -1,4 +1,5 @@ """API for Google Mail bound to Home Assistant OAuth.""" + from aiohttp.client_exceptions import ClientError, ClientResponseError from google.auth.exceptions import RefreshError from google.oauth2.credentials import Credentials diff --git a/homeassistant/components/google_mail/application_credentials.py b/homeassistant/components/google_mail/application_credentials.py index 0b3b1dfd056..a1d3ddd6dc7 100644 --- a/homeassistant/components/google_mail/application_credentials.py +++ b/homeassistant/components/google_mail/application_credentials.py @@ -1,4 +1,5 @@ """application_credentials platform for Google Mail.""" + from homeassistant.components.application_credentials import AuthorizationServer from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/google_mail/config_flow.py b/homeassistant/components/google_mail/config_flow.py index 19f82663c34..5b5c760628b 100644 --- a/homeassistant/components/google_mail/config_flow.py +++ b/homeassistant/components/google_mail/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Google Mail integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/google_mail/const.py b/homeassistant/components/google_mail/const.py index 6e70ea9838c..523182df072 100644 --- a/homeassistant/components/google_mail/const.py +++ b/homeassistant/components/google_mail/const.py @@ -1,4 +1,5 @@ """Constants for Google Mail integration.""" + from __future__ import annotations ATTR_BCC = "bcc" diff --git a/homeassistant/components/google_mail/entity.py b/homeassistant/components/google_mail/entity.py index fed8ff481f0..d83b18b9a50 100644 --- a/homeassistant/components/google_mail/entity.py +++ b/homeassistant/components/google_mail/entity.py @@ -1,4 +1,5 @@ """Entity representing a Google Mail account.""" + from __future__ import annotations from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo diff --git a/homeassistant/components/google_mail/notify.py b/homeassistant/components/google_mail/notify.py index 974b2e4e4bf..73c99d54ff3 100644 --- a/homeassistant/components/google_mail/notify.py +++ b/homeassistant/components/google_mail/notify.py @@ -1,4 +1,5 @@ """Notification service for Google Mail integration.""" + from __future__ import annotations import base64 diff --git a/homeassistant/components/google_mail/sensor.py b/homeassistant/components/google_mail/sensor.py index 78b0e3c9a91..1de72632de1 100644 --- a/homeassistant/components/google_mail/sensor.py +++ b/homeassistant/components/google_mail/sensor.py @@ -1,4 +1,5 @@ """Support for Google Mail Sensors.""" + from __future__ import annotations from datetime import UTC, datetime, timedelta diff --git a/homeassistant/components/google_mail/services.py b/homeassistant/components/google_mail/services.py index 1450a5d31b8..e07e2be2101 100644 --- a/homeassistant/components/google_mail/services.py +++ b/homeassistant/components/google_mail/services.py @@ -1,4 +1,5 @@ """Services for Google Mail integration.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/google_maps/device_tracker.py b/homeassistant/components/google_maps/device_tracker.py index 93810d0f21d..b3b0430271a 100644 --- a/homeassistant/components/google_maps/device_tracker.py +++ b/homeassistant/components/google_maps/device_tracker.py @@ -1,4 +1,5 @@ """Support for Google Maps location sharing.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/google_pubsub/__init__.py b/homeassistant/components/google_pubsub/__init__.py index 22b7b358dbc..74e2a297ff4 100644 --- a/homeassistant/components/google_pubsub/__init__.py +++ b/homeassistant/components/google_pubsub/__init__.py @@ -1,4 +1,5 @@ """Support for Google Cloud Pub/Sub.""" + from __future__ import annotations import datetime diff --git a/homeassistant/components/google_sheets/__init__.py b/homeassistant/components/google_sheets/__init__.py index ba2a0884e22..bf7cf7c40df 100644 --- a/homeassistant/components/google_sheets/__init__.py +++ b/homeassistant/components/google_sheets/__init__.py @@ -1,4 +1,5 @@ """Support for Google Sheets.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/google_sheets/application_credentials.py b/homeassistant/components/google_sheets/application_credentials.py index f10f6891125..8e1f96bfa6e 100644 --- a/homeassistant/components/google_sheets/application_credentials.py +++ b/homeassistant/components/google_sheets/application_credentials.py @@ -1,4 +1,5 @@ """application_credentials platform for Google Sheets.""" + from homeassistant.components.application_credentials import AuthorizationServer from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/google_sheets/config_flow.py b/homeassistant/components/google_sheets/config_flow.py index 4c1455f3c2e..a0a99742249 100644 --- a/homeassistant/components/google_sheets/config_flow.py +++ b/homeassistant/components/google_sheets/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Google Sheets integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/google_sheets/const.py b/homeassistant/components/google_sheets/const.py index 71ef8f4a4f4..b93916db0a6 100644 --- a/homeassistant/components/google_sheets/const.py +++ b/homeassistant/components/google_sheets/const.py @@ -1,4 +1,5 @@ """Constants for Google Sheets integration.""" + from __future__ import annotations DOMAIN = "google_sheets" diff --git a/homeassistant/components/google_tasks/__init__.py b/homeassistant/components/google_tasks/__init__.py index da6fc85b287..b62bd0fe5a2 100644 --- a/homeassistant/components/google_tasks/__init__.py +++ b/homeassistant/components/google_tasks/__init__.py @@ -1,4 +1,5 @@ """The Google Tasks integration.""" + from __future__ import annotations from aiohttp import ClientError diff --git a/homeassistant/components/google_tasks/todo.py b/homeassistant/components/google_tasks/todo.py index e83b0d39a30..95c5f1c3a16 100644 --- a/homeassistant/components/google_tasks/todo.py +++ b/homeassistant/components/google_tasks/todo.py @@ -1,4 +1,5 @@ """Google Tasks todo platform.""" + from __future__ import annotations from datetime import date, datetime, timedelta diff --git a/homeassistant/components/google_translate/__init__.py b/homeassistant/components/google_translate/__init__.py index ac6b07bd4b3..17400bbd0e2 100644 --- a/homeassistant/components/google_translate/__init__.py +++ b/homeassistant/components/google_translate/__init__.py @@ -1,4 +1,5 @@ """The Google Translate text-to-speech integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/google_translate/config_flow.py b/homeassistant/components/google_translate/config_flow.py index a5b94bafd90..5c140167b81 100644 --- a/homeassistant/components/google_translate/config_flow.py +++ b/homeassistant/components/google_translate/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Google Translate text-to-speech integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/google_translate/const.py b/homeassistant/components/google_translate/const.py index 0bb8663119b..76827606816 100644 --- a/homeassistant/components/google_translate/const.py +++ b/homeassistant/components/google_translate/const.py @@ -1,4 +1,5 @@ """Constants for the Google Translate text-to-speech integration.""" + from dataclasses import dataclass CONF_TLD = "tld" diff --git a/homeassistant/components/google_translate/tts.py b/homeassistant/components/google_translate/tts.py index 7774d9fd6c8..df7130e09e0 100644 --- a/homeassistant/components/google_translate/tts.py +++ b/homeassistant/components/google_translate/tts.py @@ -1,4 +1,5 @@ """Support for the Google speech service.""" + from __future__ import annotations from io import BytesIO diff --git a/homeassistant/components/google_travel_time/__init__.py b/homeassistant/components/google_travel_time/__init__.py index b2778a34c10..4ee9d53cf3b 100644 --- a/homeassistant/components/google_travel_time/__init__.py +++ b/homeassistant/components/google_travel_time/__init__.py @@ -1,4 +1,5 @@ """The google_travel_time component.""" + from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/google_travel_time/config_flow.py b/homeassistant/components/google_travel_time/config_flow.py index 8076df53433..424ad56b9d4 100644 --- a/homeassistant/components/google_travel_time/config_flow.py +++ b/homeassistant/components/google_travel_time/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Google Maps Travel Time integration.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/google_travel_time/sensor.py b/homeassistant/components/google_travel_time/sensor.py index 95eb965a4ff..6c45033eeb7 100644 --- a/homeassistant/components/google_travel_time/sensor.py +++ b/homeassistant/components/google_travel_time/sensor.py @@ -1,4 +1,5 @@ """Support for Google travel time sensors.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/google_wifi/sensor.py b/homeassistant/components/google_wifi/sensor.py index f90cc028fdf..71e3e2e3652 100644 --- a/homeassistant/components/google_wifi/sensor.py +++ b/homeassistant/components/google_wifi/sensor.py @@ -1,4 +1,5 @@ """Support for retrieving status info from Google Wifi/OnHub routers.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/govee_ble/__init__.py b/homeassistant/components/govee_ble/__init__.py index a2dbecf85a2..d5c601b55d9 100644 --- a/homeassistant/components/govee_ble/__init__.py +++ b/homeassistant/components/govee_ble/__init__.py @@ -1,4 +1,5 @@ """The Govee Bluetooth BLE integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/govee_ble/config_flow.py b/homeassistant/components/govee_ble/config_flow.py index ecd39cfbff0..f580fca68d8 100644 --- a/homeassistant/components/govee_ble/config_flow.py +++ b/homeassistant/components/govee_ble/config_flow.py @@ -1,4 +1,5 @@ """Config flow for govee ble integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/govee_ble/sensor.py b/homeassistant/components/govee_ble/sensor.py index 3809a2390f3..33f4761d02a 100644 --- a/homeassistant/components/govee_ble/sensor.py +++ b/homeassistant/components/govee_ble/sensor.py @@ -1,4 +1,5 @@ """Support for govee ble sensors.""" + from __future__ import annotations from govee_ble import DeviceClass, DeviceKey, SensorUpdate, Units diff --git a/homeassistant/components/govee_light_local/__init__.py b/homeassistant/components/govee_light_local/__init__.py index 2d4594755c4..5a791b9e3d1 100644 --- a/homeassistant/components/govee_light_local/__init__.py +++ b/homeassistant/components/govee_light_local/__init__.py @@ -1,4 +1,5 @@ """The Govee Light local integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/gpsd/__init__.py b/homeassistant/components/gpsd/__init__.py index bdd5ddb13b0..a0e3db2e404 100644 --- a/homeassistant/components/gpsd/__init__.py +++ b/homeassistant/components/gpsd/__init__.py @@ -1,4 +1,5 @@ """The GPSD integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/gpsd/config_flow.py b/homeassistant/components/gpsd/config_flow.py index 9979fd6c922..10fb8a3a252 100644 --- a/homeassistant/components/gpsd/config_flow.py +++ b/homeassistant/components/gpsd/config_flow.py @@ -1,4 +1,5 @@ """Config flow for GPSD integration.""" + from __future__ import annotations import socket diff --git a/homeassistant/components/gpsd/sensor.py b/homeassistant/components/gpsd/sensor.py index 135d9c6c28f..bc08b7b6203 100644 --- a/homeassistant/components/gpsd/sensor.py +++ b/homeassistant/components/gpsd/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for GPSD integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/gpslogger/__init__.py b/homeassistant/components/gpslogger/__init__.py index 9f00e2cb52d..5d35314adf8 100644 --- a/homeassistant/components/gpslogger/__init__.py +++ b/homeassistant/components/gpslogger/__init__.py @@ -1,4 +1,5 @@ """Support for GPSLogger.""" + from http import HTTPStatus from aiohttp import web diff --git a/homeassistant/components/gpslogger/config_flow.py b/homeassistant/components/gpslogger/config_flow.py index ef90a8d1607..b0a114a4330 100644 --- a/homeassistant/components/gpslogger/config_flow.py +++ b/homeassistant/components/gpslogger/config_flow.py @@ -1,4 +1,5 @@ """Config flow for GPSLogger.""" + from homeassistant.helpers import config_entry_flow from .const import DOMAIN diff --git a/homeassistant/components/gpslogger/device_tracker.py b/homeassistant/components/gpslogger/device_tracker.py index 278d6571cb7..025183718fc 100644 --- a/homeassistant/components/gpslogger/device_tracker.py +++ b/homeassistant/components/gpslogger/device_tracker.py @@ -1,4 +1,5 @@ """Support for the GPSLogger device tracking.""" + from homeassistant.components.device_tracker import SourceType, TrackerEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( diff --git a/homeassistant/components/graphite/__init__.py b/homeassistant/components/graphite/__init__.py index 8e9b015cdad..17dd140aef7 100644 --- a/homeassistant/components/graphite/__init__.py +++ b/homeassistant/components/graphite/__init__.py @@ -1,4 +1,5 @@ """Support for sending data to a Graphite installation.""" + from contextlib import suppress import logging import queue diff --git a/homeassistant/components/gree/__init__.py b/homeassistant/components/gree/__init__.py index 13e93d780b2..5b2e95b15e2 100644 --- a/homeassistant/components/gree/__init__.py +++ b/homeassistant/components/gree/__init__.py @@ -1,4 +1,5 @@ """The Gree Climate integration.""" + from datetime import timedelta import logging diff --git a/homeassistant/components/gree/bridge.py b/homeassistant/components/gree/bridge.py index ebd5e78a820..867f742e821 100644 --- a/homeassistant/components/gree/bridge.py +++ b/homeassistant/components/gree/bridge.py @@ -1,4 +1,5 @@ """Helper and wrapper classes for Gree module.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/gree/climate.py b/homeassistant/components/gree/climate.py index 1d061c06901..66b025d52b5 100644 --- a/homeassistant/components/gree/climate.py +++ b/homeassistant/components/gree/climate.py @@ -1,4 +1,5 @@ """Support for interface with a Gree climate systems.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/gree/config_flow.py b/homeassistant/components/gree/config_flow.py index 58f83cd4486..5e118088916 100644 --- a/homeassistant/components/gree/config_flow.py +++ b/homeassistant/components/gree/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Gree.""" + from greeclimate.discovery import Discovery from homeassistant.components.network import async_get_ipv4_broadcast_addresses diff --git a/homeassistant/components/gree/entity.py b/homeassistant/components/gree/entity.py index c965ad45721..4eb4a0cbaeb 100644 --- a/homeassistant/components/gree/entity.py +++ b/homeassistant/components/gree/entity.py @@ -1,4 +1,5 @@ """Entity object for shared properties of Gree entities.""" + from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo from homeassistant.helpers.update_coordinator import CoordinatorEntity diff --git a/homeassistant/components/gree/switch.py b/homeassistant/components/gree/switch.py index e18cf28e174..c1612ce99de 100644 --- a/homeassistant/components/gree/switch.py +++ b/homeassistant/components/gree/switch.py @@ -1,4 +1,5 @@ """Support for interface with a Gree climate systems.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/greeneye_monitor/__init__.py b/homeassistant/components/greeneye_monitor/__init__.py index e4090787e65..083d431e338 100644 --- a/homeassistant/components/greeneye_monitor/__init__.py +++ b/homeassistant/components/greeneye_monitor/__init__.py @@ -1,4 +1,5 @@ """Support for monitoring a GreenEye Monitor energy monitor.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/greeneye_monitor/sensor.py b/homeassistant/components/greeneye_monitor/sensor.py index c11a4168045..c11e08eaa84 100644 --- a/homeassistant/components/greeneye_monitor/sensor.py +++ b/homeassistant/components/greeneye_monitor/sensor.py @@ -1,4 +1,5 @@ """Support for the sensors in a GreenEye Monitor.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/greenwave/light.py b/homeassistant/components/greenwave/light.py index 9f904018796..aa592727220 100644 --- a/homeassistant/components/greenwave/light.py +++ b/homeassistant/components/greenwave/light.py @@ -1,4 +1,5 @@ """Support for Greenwave Reality (TCP Connected) lights.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/group/__init__.py b/homeassistant/components/group/__init__.py index 9ee81191bf8..af843db6257 100644 --- a/homeassistant/components/group/__init__.py +++ b/homeassistant/components/group/__init__.py @@ -1,4 +1,5 @@ """Provide the functionality to group entities.""" + from __future__ import annotations from abc import abstractmethod diff --git a/homeassistant/components/group/binary_sensor.py b/homeassistant/components/group/binary_sensor.py index d63dcb5e8f2..16665e8970f 100644 --- a/homeassistant/components/group/binary_sensor.py +++ b/homeassistant/components/group/binary_sensor.py @@ -1,4 +1,5 @@ """Platform allowing several binary sensor to be grouped into one binary sensor.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/group/config_flow.py b/homeassistant/components/group/config_flow.py index 488f5e131f3..71243ffbd74 100644 --- a/homeassistant/components/group/config_flow.py +++ b/homeassistant/components/group/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Group integration.""" + from __future__ import annotations from collections.abc import Callable, Coroutine, Mapping diff --git a/homeassistant/components/group/cover.py b/homeassistant/components/group/cover.py index 78d29378076..8d521314f96 100644 --- a/homeassistant/components/group/cover.py +++ b/homeassistant/components/group/cover.py @@ -1,4 +1,5 @@ """Platform allowing several cover to be grouped into one cover.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/group/event.py b/homeassistant/components/group/event.py index b98991e13fc..def92b3d6d4 100644 --- a/homeassistant/components/group/event.py +++ b/homeassistant/components/group/event.py @@ -1,4 +1,5 @@ """Platform allowing several event entities to be grouped into one event.""" + from __future__ import annotations import itertools diff --git a/homeassistant/components/group/fan.py b/homeassistant/components/group/fan.py index afd240c5767..c8add0b6724 100644 --- a/homeassistant/components/group/fan.py +++ b/homeassistant/components/group/fan.py @@ -1,4 +1,5 @@ """Platform allowing several fans to be grouped into one fan.""" + from __future__ import annotations from functools import reduce diff --git a/homeassistant/components/group/light.py b/homeassistant/components/group/light.py index c8689cdaa1c..d014ca5d618 100644 --- a/homeassistant/components/group/light.py +++ b/homeassistant/components/group/light.py @@ -1,4 +1,5 @@ """Platform allowing several lights to be grouped into one light.""" + from __future__ import annotations from collections import Counter diff --git a/homeassistant/components/group/lock.py b/homeassistant/components/group/lock.py index 4a6fdc3e2ed..08c2c053b0e 100644 --- a/homeassistant/components/group/lock.py +++ b/homeassistant/components/group/lock.py @@ -1,4 +1,5 @@ """Platform allowing several locks to be grouped into one lock.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/group/media_player.py b/homeassistant/components/group/media_player.py index aa38f364d93..82a15177a4a 100644 --- a/homeassistant/components/group/media_player.py +++ b/homeassistant/components/group/media_player.py @@ -1,4 +1,5 @@ """Platform allowing several media players to be grouped into one media player.""" + from __future__ import annotations from collections.abc import Callable, Mapping diff --git a/homeassistant/components/group/notify.py b/homeassistant/components/group/notify.py index 2747ba55ee1..bad3d7944d3 100644 --- a/homeassistant/components/group/notify.py +++ b/homeassistant/components/group/notify.py @@ -1,4 +1,5 @@ """Group platform for notify component.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/group/reproduce_state.py b/homeassistant/components/group/reproduce_state.py index c99f098b222..3646f957597 100644 --- a/homeassistant/components/group/reproduce_state.py +++ b/homeassistant/components/group/reproduce_state.py @@ -1,4 +1,5 @@ """Module that groups code required to handle state restore for component.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/group/switch.py b/homeassistant/components/group/switch.py index 3f68d7125aa..ec70f137b33 100644 --- a/homeassistant/components/group/switch.py +++ b/homeassistant/components/group/switch.py @@ -1,4 +1,5 @@ """Platform allowing several switches to be grouped into one switch.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/group/util.py b/homeassistant/components/group/util.py index da67e071f27..14f5064290f 100644 --- a/homeassistant/components/group/util.py +++ b/homeassistant/components/group/util.py @@ -1,4 +1,5 @@ """Utility functions to combine state attributes from multiple entities.""" + from __future__ import annotations from collections.abc import Callable, Iterator diff --git a/homeassistant/components/growatt_server/__init__.py b/homeassistant/components/growatt_server/__init__.py index 177d0957883..66df76bc6cb 100644 --- a/homeassistant/components/growatt_server/__init__.py +++ b/homeassistant/components/growatt_server/__init__.py @@ -1,4 +1,5 @@ """The Growatt server PV inverter sensor integration.""" + from homeassistant import config_entries from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/growatt_server/const.py b/homeassistant/components/growatt_server/const.py index e4e7c638fa3..fe8622bea7f 100644 --- a/homeassistant/components/growatt_server/const.py +++ b/homeassistant/components/growatt_server/const.py @@ -1,4 +1,5 @@ """Define constants for the Growatt Server component.""" + from homeassistant.const import Platform CONF_PLANT_ID = "plant_id" diff --git a/homeassistant/components/growatt_server/sensor.py b/homeassistant/components/growatt_server/sensor.py index 06d06ed26ce..3cf1fa30c99 100644 --- a/homeassistant/components/growatt_server/sensor.py +++ b/homeassistant/components/growatt_server/sensor.py @@ -1,4 +1,5 @@ """Read status of growatt inverters.""" + from __future__ import annotations import datetime diff --git a/homeassistant/components/growatt_server/sensor_types/inverter.py b/homeassistant/components/growatt_server/sensor_types/inverter.py index cfacadce528..6f78e019184 100644 --- a/homeassistant/components/growatt_server/sensor_types/inverter.py +++ b/homeassistant/components/growatt_server/sensor_types/inverter.py @@ -1,4 +1,5 @@ """Growatt Sensor definitions for the Inverter type.""" + from __future__ import annotations from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass diff --git a/homeassistant/components/growatt_server/sensor_types/mix.py b/homeassistant/components/growatt_server/sensor_types/mix.py index e9722abda11..b741a589b8f 100644 --- a/homeassistant/components/growatt_server/sensor_types/mix.py +++ b/homeassistant/components/growatt_server/sensor_types/mix.py @@ -1,4 +1,5 @@ """Growatt Sensor definitions for the Mix type.""" + from __future__ import annotations from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass diff --git a/homeassistant/components/growatt_server/sensor_types/sensor_entity_description.py b/homeassistant/components/growatt_server/sensor_types/sensor_entity_description.py index cfeb98a382e..e1ee4c30326 100644 --- a/homeassistant/components/growatt_server/sensor_types/sensor_entity_description.py +++ b/homeassistant/components/growatt_server/sensor_types/sensor_entity_description.py @@ -1,4 +1,5 @@ """Sensor Entity Description for the Growatt integration.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/growatt_server/sensor_types/storage.py b/homeassistant/components/growatt_server/sensor_types/storage.py index 4b60a73c979..e8895755c65 100644 --- a/homeassistant/components/growatt_server/sensor_types/storage.py +++ b/homeassistant/components/growatt_server/sensor_types/storage.py @@ -1,4 +1,5 @@ """Growatt Sensor definitions for the Storage type.""" + from __future__ import annotations from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass diff --git a/homeassistant/components/growatt_server/sensor_types/tlx.py b/homeassistant/components/growatt_server/sensor_types/tlx.py index 645b32db9d0..d8f158f2421 100644 --- a/homeassistant/components/growatt_server/sensor_types/tlx.py +++ b/homeassistant/components/growatt_server/sensor_types/tlx.py @@ -2,6 +2,7 @@ TLX Type is also shown on the UI as: "MIN/MIC/MOD/NEO" """ + from __future__ import annotations from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass diff --git a/homeassistant/components/growatt_server/sensor_types/total.py b/homeassistant/components/growatt_server/sensor_types/total.py index 5945ad20e40..8111728d1e9 100644 --- a/homeassistant/components/growatt_server/sensor_types/total.py +++ b/homeassistant/components/growatt_server/sensor_types/total.py @@ -1,4 +1,5 @@ """Growatt Sensor definitions for Totals.""" + from __future__ import annotations from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass diff --git a/homeassistant/components/gstreamer/media_player.py b/homeassistant/components/gstreamer/media_player.py index cb221d49417..054b31c2fbe 100644 --- a/homeassistant/components/gstreamer/media_player.py +++ b/homeassistant/components/gstreamer/media_player.py @@ -1,4 +1,5 @@ """Play media via gstreamer.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/gtfs/sensor.py b/homeassistant/components/gtfs/sensor.py index 87d2b55aa24..8a20755e936 100644 --- a/homeassistant/components/gtfs/sensor.py +++ b/homeassistant/components/gtfs/sensor.py @@ -1,4 +1,5 @@ """Support for GTFS (Google/General Transport Format Schema).""" + from __future__ import annotations import datetime diff --git a/homeassistant/components/guardian/__init__.py b/homeassistant/components/guardian/__init__.py index 8a3ac265618..4c6a979cd1d 100644 --- a/homeassistant/components/guardian/__init__.py +++ b/homeassistant/components/guardian/__init__.py @@ -1,4 +1,5 @@ """The Elexa Guardian integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/guardian/binary_sensor.py b/homeassistant/components/guardian/binary_sensor.py index c7094cf624c..c3621ea2d79 100644 --- a/homeassistant/components/guardian/binary_sensor.py +++ b/homeassistant/components/guardian/binary_sensor.py @@ -1,4 +1,5 @@ """Binary sensors for the Elexa Guardian integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/guardian/button.py b/homeassistant/components/guardian/button.py index cb9c6f0121c..8313ad23007 100644 --- a/homeassistant/components/guardian/button.py +++ b/homeassistant/components/guardian/button.py @@ -1,4 +1,5 @@ """Buttons for the Elexa Guardian integration.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/guardian/config_flow.py b/homeassistant/components/guardian/config_flow.py index fb160c7f959..e73e6c586ce 100644 --- a/homeassistant/components/guardian/config_flow.py +++ b/homeassistant/components/guardian/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Elexa Guardian integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/guardian/coordinator.py b/homeassistant/components/guardian/coordinator.py index dda0a20be69..819fda8bdc7 100644 --- a/homeassistant/components/guardian/coordinator.py +++ b/homeassistant/components/guardian/coordinator.py @@ -1,4 +1,5 @@ """Define Guardian-specific utilities.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/guardian/diagnostics.py b/homeassistant/components/guardian/diagnostics.py index b0317167f79..2f4287bea29 100644 --- a/homeassistant/components/guardian/diagnostics.py +++ b/homeassistant/components/guardian/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Guardian.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/guardian/sensor.py b/homeassistant/components/guardian/sensor.py index 1941dc54248..448a7231df1 100644 --- a/homeassistant/components/guardian/sensor.py +++ b/homeassistant/components/guardian/sensor.py @@ -1,4 +1,5 @@ """Sensors for the Elexa Guardian integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/guardian/switch.py b/homeassistant/components/guardian/switch.py index ebe8e5549ce..25bc8115208 100644 --- a/homeassistant/components/guardian/switch.py +++ b/homeassistant/components/guardian/switch.py @@ -1,4 +1,5 @@ """Switches for the Elexa Guardian integration.""" + from __future__ import annotations from collections.abc import Awaitable, Callable, Mapping diff --git a/homeassistant/components/guardian/util.py b/homeassistant/components/guardian/util.py index a5e91dce813..6d407f9c7cc 100644 --- a/homeassistant/components/guardian/util.py +++ b/homeassistant/components/guardian/util.py @@ -1,4 +1,5 @@ """Define Guardian-specific utilities.""" + from __future__ import annotations from collections.abc import Callable, Coroutine, Iterable diff --git a/homeassistant/components/guardian/valve.py b/homeassistant/components/guardian/valve.py index a2b6b5b6ab7..fcedc71f188 100644 --- a/homeassistant/components/guardian/valve.py +++ b/homeassistant/components/guardian/valve.py @@ -1,4 +1,5 @@ """Valves for the Elexa Guardian integration.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/habitica/config_flow.py b/homeassistant/components/habitica/config_flow.py index 4c607ea4a38..18bdb4b45ce 100644 --- a/homeassistant/components/habitica/config_flow.py +++ b/homeassistant/components/habitica/config_flow.py @@ -1,4 +1,5 @@ """Config flow for habitica integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/habitica/sensor.py b/homeassistant/components/habitica/sensor.py index d9e0fb227c0..eb37f585899 100644 --- a/homeassistant/components/habitica/sensor.py +++ b/homeassistant/components/habitica/sensor.py @@ -1,4 +1,5 @@ """Support for Habitica sensors.""" + from __future__ import annotations from collections import namedtuple diff --git a/homeassistant/components/hardkernel/__init__.py b/homeassistant/components/hardkernel/__init__.py index 41e65ff8b5e..5d70f6cbfe0 100644 --- a/homeassistant/components/hardkernel/__init__.py +++ b/homeassistant/components/hardkernel/__init__.py @@ -1,4 +1,5 @@ """The Hardkernel integration.""" + from __future__ import annotations from homeassistant.components.hassio import get_os_info, is_hassio diff --git a/homeassistant/components/hardkernel/config_flow.py b/homeassistant/components/hardkernel/config_flow.py index 457ad3b97b5..cf70adae55a 100644 --- a/homeassistant/components/hardkernel/config_flow.py +++ b/homeassistant/components/hardkernel/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the Hardkernel integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hardkernel/hardware.py b/homeassistant/components/hardkernel/hardware.py index c94de0db68d..86dcf073680 100644 --- a/homeassistant/components/hardkernel/hardware.py +++ b/homeassistant/components/hardkernel/hardware.py @@ -1,4 +1,5 @@ """The Hardkernel hardware platform.""" + from __future__ import annotations from homeassistant.components.hardware.models import BoardInfo, HardwareInfo diff --git a/homeassistant/components/hardware/__init__.py b/homeassistant/components/hardware/__init__.py index 2e00771199c..9de281b1e50 100644 --- a/homeassistant/components/hardware/__init__.py +++ b/homeassistant/components/hardware/__init__.py @@ -1,4 +1,5 @@ """The Hardware integration.""" + from __future__ import annotations from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/hardware/hardware.py b/homeassistant/components/hardware/hardware.py index 800f15137c6..f2de9182b57 100644 --- a/homeassistant/components/hardware/hardware.py +++ b/homeassistant/components/hardware/hardware.py @@ -1,4 +1,5 @@ """The Hardware integration.""" + from __future__ import annotations from homeassistant.core import HomeAssistant, callback diff --git a/homeassistant/components/hardware/models.py b/homeassistant/components/hardware/models.py index 6b852291323..6f25d6669cf 100644 --- a/homeassistant/components/hardware/models.py +++ b/homeassistant/components/hardware/models.py @@ -1,4 +1,5 @@ """Models for Hardware.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/hardware/websocket_api.py b/homeassistant/components/hardware/websocket_api.py index d4e4f2fed5c..694c6e782e1 100644 --- a/homeassistant/components/hardware/websocket_api.py +++ b/homeassistant/components/hardware/websocket_api.py @@ -1,4 +1,5 @@ """The Hardware websocket API.""" + from __future__ import annotations import contextlib diff --git a/homeassistant/components/harman_kardon_avr/media_player.py b/homeassistant/components/harman_kardon_avr/media_player.py index 17b3d0c5717..815a8f52b42 100644 --- a/homeassistant/components/harman_kardon_avr/media_player.py +++ b/homeassistant/components/harman_kardon_avr/media_player.py @@ -1,4 +1,5 @@ """Support for interface with an Harman/Kardon or JBL AVR.""" + from __future__ import annotations import hkavr diff --git a/homeassistant/components/harmony/config_flow.py b/homeassistant/components/harmony/config_flow.py index 5732740dd20..b579e7659f4 100644 --- a/homeassistant/components/harmony/config_flow.py +++ b/homeassistant/components/harmony/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Logitech Harmony Hub integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/harmony/const.py b/homeassistant/components/harmony/const.py index 8df5b3d578c..69ef2cb66c9 100644 --- a/homeassistant/components/harmony/const.py +++ b/homeassistant/components/harmony/const.py @@ -1,4 +1,5 @@ """Constants for the Harmony component.""" + from homeassistant.const import Platform DOMAIN = "harmony" diff --git a/homeassistant/components/harmony/data.py b/homeassistant/components/harmony/data.py index f7eb96d6a8f..75678391e7b 100644 --- a/homeassistant/components/harmony/data.py +++ b/homeassistant/components/harmony/data.py @@ -1,4 +1,5 @@ """Harmony data object which contains the Harmony Client.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/harmony/entity.py b/homeassistant/components/harmony/entity.py index b1b1599a16c..f87d30a0e40 100644 --- a/homeassistant/components/harmony/entity.py +++ b/homeassistant/components/harmony/entity.py @@ -1,4 +1,5 @@ """Base class Harmony entities.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/harmony/remote.py b/homeassistant/components/harmony/remote.py index 863c3fe5c56..90b7f29b17f 100644 --- a/homeassistant/components/harmony/remote.py +++ b/homeassistant/components/harmony/remote.py @@ -1,4 +1,5 @@ """Support for Harmony Hub devices.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/harmony/select.py b/homeassistant/components/harmony/select.py index f08030c0152..6338f0c6269 100644 --- a/homeassistant/components/harmony/select.py +++ b/homeassistant/components/harmony/select.py @@ -1,4 +1,5 @@ """Support for Harmony Hub select activities.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/harmony/subscriber.py b/homeassistant/components/harmony/subscriber.py index 8a47e437e17..4623e8fa48d 100644 --- a/homeassistant/components/harmony/subscriber.py +++ b/homeassistant/components/harmony/subscriber.py @@ -1,4 +1,5 @@ """Mixin class for handling harmony callback subscriptions.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hassio/__init__.py b/homeassistant/components/hassio/__init__.py index 1a666fcc42d..802b84cee43 100644 --- a/homeassistant/components/hassio/__init__.py +++ b/homeassistant/components/hassio/__init__.py @@ -1,4 +1,5 @@ """Support for Hass.io.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hassio/addon_manager.py b/homeassistant/components/hassio/addon_manager.py index 7f9299fa2b1..fcdcd38f776 100644 --- a/homeassistant/components/hassio/addon_manager.py +++ b/homeassistant/components/hassio/addon_manager.py @@ -1,4 +1,5 @@ """Provide add-on management.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hassio/addon_panel.py b/homeassistant/components/hassio/addon_panel.py index db53b2f90fc..f0ccecb22f1 100644 --- a/homeassistant/components/hassio/addon_panel.py +++ b/homeassistant/components/hassio/addon_panel.py @@ -1,4 +1,5 @@ """Implement the Ingress Panel feature for Hass.io Add-ons.""" + from http import HTTPStatus import logging from typing import Any diff --git a/homeassistant/components/hassio/auth.py b/homeassistant/components/hassio/auth.py index 7ee9f04120a..52016b20659 100644 --- a/homeassistant/components/hassio/auth.py +++ b/homeassistant/components/hassio/auth.py @@ -1,4 +1,5 @@ """Implement the auth feature from Hass.io for Add-ons.""" + from http import HTTPStatus from ipaddress import ip_address import logging diff --git a/homeassistant/components/hassio/binary_sensor.py b/homeassistant/components/hassio/binary_sensor.py index b5b4bef1bd8..9d6e2ba19da 100644 --- a/homeassistant/components/hassio/binary_sensor.py +++ b/homeassistant/components/hassio/binary_sensor.py @@ -1,4 +1,5 @@ """Binary sensor platform for Hass.io addons.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/hassio/config_flow.py b/homeassistant/components/hassio/config_flow.py index a4c79a97675..57be400acc7 100644 --- a/homeassistant/components/hassio/config_flow.py +++ b/homeassistant/components/hassio/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Home Assistant Supervisor integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hassio/const.py b/homeassistant/components/hassio/const.py index 4559326b521..2aa5fdd13b5 100644 --- a/homeassistant/components/hassio/const.py +++ b/homeassistant/components/hassio/const.py @@ -1,4 +1,5 @@ """Hass.io const variables.""" + from datetime import timedelta from enum import StrEnum diff --git a/homeassistant/components/hassio/data.py b/homeassistant/components/hassio/data.py index cb496bd0e5a..eaa7c2431fe 100644 --- a/homeassistant/components/hassio/data.py +++ b/homeassistant/components/hassio/data.py @@ -1,4 +1,5 @@ """Data for Hass.io.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hassio/diagnostics.py b/homeassistant/components/hassio/diagnostics.py index e4f98e87fc5..ae8b8b3b740 100644 --- a/homeassistant/components/hassio/diagnostics.py +++ b/homeassistant/components/hassio/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Supervisor.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hassio/discovery.py b/homeassistant/components/hassio/discovery.py index 1810e3ed2c5..173583c9891 100644 --- a/homeassistant/components/hassio/discovery.py +++ b/homeassistant/components/hassio/discovery.py @@ -1,4 +1,5 @@ """Implement the services discovery feature from Hass.io for Add-ons.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hassio/entity.py b/homeassistant/components/hassio/entity.py index 8ffe4a37bb0..11259c65d24 100644 --- a/homeassistant/components/hassio/entity.py +++ b/homeassistant/components/hassio/entity.py @@ -1,4 +1,5 @@ """Base for Hass.io entities.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hassio/handler.py b/homeassistant/components/hassio/handler.py index 9b8e6367647..bcfb4a497a0 100644 --- a/homeassistant/components/hassio/handler.py +++ b/homeassistant/components/hassio/handler.py @@ -1,4 +1,5 @@ """Handler for Hass.io.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hassio/http.py b/homeassistant/components/hassio/http.py index afaa57dda9a..edbcf93d7e5 100644 --- a/homeassistant/components/hassio/http.py +++ b/homeassistant/components/hassio/http.py @@ -1,4 +1,5 @@ """HTTP Support for Hass.io.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/hassio/ingress.py b/homeassistant/components/hassio/ingress.py index f9ff1dd7770..d325fb10f35 100644 --- a/homeassistant/components/hassio/ingress.py +++ b/homeassistant/components/hassio/ingress.py @@ -1,4 +1,5 @@ """Hass.io Add-on ingress service.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hassio/issues.py b/homeassistant/components/hassio/issues.py index 8bd47faef08..c47ea315089 100644 --- a/homeassistant/components/hassio/issues.py +++ b/homeassistant/components/hassio/issues.py @@ -1,4 +1,5 @@ """Supervisor events monitor.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hassio/repairs.py b/homeassistant/components/hassio/repairs.py index fcfe23dda6e..42fe5148be7 100644 --- a/homeassistant/components/hassio/repairs.py +++ b/homeassistant/components/hassio/repairs.py @@ -1,4 +1,5 @@ """Repairs implementation for supervisor integration.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/hassio/sensor.py b/homeassistant/components/hassio/sensor.py index aeb0a8fc056..5a981d6c96c 100644 --- a/homeassistant/components/hassio/sensor.py +++ b/homeassistant/components/hassio/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for Hass.io addons.""" + from __future__ import annotations from homeassistant.components.sensor import ( diff --git a/homeassistant/components/hassio/system_health.py b/homeassistant/components/hassio/system_health.py index e46db2f8e75..b77187718bb 100644 --- a/homeassistant/components/hassio/system_health.py +++ b/homeassistant/components/hassio/system_health.py @@ -1,4 +1,5 @@ """Provide info to system health.""" + from __future__ import annotations import os diff --git a/homeassistant/components/hassio/update.py b/homeassistant/components/hassio/update.py index 41a505bb043..6a3bba90234 100644 --- a/homeassistant/components/hassio/update.py +++ b/homeassistant/components/hassio/update.py @@ -1,4 +1,5 @@ """Update platform for Supervisor.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/haveibeenpwned/sensor.py b/homeassistant/components/haveibeenpwned/sensor.py index 7caf9690bd8..c0a55279b82 100644 --- a/homeassistant/components/haveibeenpwned/sensor.py +++ b/homeassistant/components/haveibeenpwned/sensor.py @@ -1,4 +1,5 @@ """Support for haveibeenpwned (email breaches) sensor.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/hddtemp/sensor.py b/homeassistant/components/hddtemp/sensor.py index 77c2a28190b..27a514bd58f 100644 --- a/homeassistant/components/hddtemp/sensor.py +++ b/homeassistant/components/hddtemp/sensor.py @@ -1,4 +1,5 @@ """Support for getting the disk temperature of a host.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/hdmi_cec/__init__.py b/homeassistant/components/hdmi_cec/__init__.py index 54ea2f3e5bd..07a45cf8480 100644 --- a/homeassistant/components/hdmi_cec/__init__.py +++ b/homeassistant/components/hdmi_cec/__init__.py @@ -1,4 +1,5 @@ """Support for HDMI CEC.""" + from __future__ import annotations from functools import reduce diff --git a/homeassistant/components/hdmi_cec/media_player.py b/homeassistant/components/hdmi_cec/media_player.py index df7df830fdb..4cd95a6c382 100644 --- a/homeassistant/components/hdmi_cec/media_player.py +++ b/homeassistant/components/hdmi_cec/media_player.py @@ -1,4 +1,5 @@ """Support for HDMI CEC devices as media players.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/hdmi_cec/switch.py b/homeassistant/components/hdmi_cec/switch.py index a554594a219..280ea20413b 100644 --- a/homeassistant/components/hdmi_cec/switch.py +++ b/homeassistant/components/hdmi_cec/switch.py @@ -1,4 +1,5 @@ """Support for HDMI CEC devices as switches.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/heatmiser/climate.py b/homeassistant/components/heatmiser/climate.py index 566a4696a73..8639d1f953e 100644 --- a/homeassistant/components/heatmiser/climate.py +++ b/homeassistant/components/heatmiser/climate.py @@ -1,4 +1,5 @@ """Support for the PRT Heatmiser themostats using the V3 protocol.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/heos/__init__.py b/homeassistant/components/heos/__init__.py index c50b70245e3..ed7c768e161 100644 --- a/homeassistant/components/heos/__init__.py +++ b/homeassistant/components/heos/__init__.py @@ -1,4 +1,5 @@ """Denon HEOS Media Player.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/heos/config_flow.py b/homeassistant/components/heos/config_flow.py index 9e7e288dffc..b68d7d16717 100644 --- a/homeassistant/components/heos/config_flow.py +++ b/homeassistant/components/heos/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure Heos.""" + from typing import TYPE_CHECKING from urllib.parse import urlparse diff --git a/homeassistant/components/heos/media_player.py b/homeassistant/components/heos/media_player.py index 8502dec28fa..5fd64ec7d38 100644 --- a/homeassistant/components/heos/media_player.py +++ b/homeassistant/components/heos/media_player.py @@ -1,4 +1,5 @@ """Denon HEOS Media Player.""" + from __future__ import annotations from collections.abc import Awaitable, Callable, Coroutine diff --git a/homeassistant/components/here_travel_time/__init__.py b/homeassistant/components/here_travel_time/__init__.py index 1c728bcc12c..19ba1f8ebaf 100644 --- a/homeassistant/components/here_travel_time/__init__.py +++ b/homeassistant/components/here_travel_time/__init__.py @@ -1,4 +1,5 @@ """The HERE Travel Time integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/here_travel_time/config_flow.py b/homeassistant/components/here_travel_time/config_flow.py index 9bca80b7843..d27ea577c29 100644 --- a/homeassistant/components/here_travel_time/config_flow.py +++ b/homeassistant/components/here_travel_time/config_flow.py @@ -1,4 +1,5 @@ """Config flow for HERE Travel Time integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/here_travel_time/const.py b/homeassistant/components/here_travel_time/const.py index a2a14a445d7..785070cd3b1 100644 --- a/homeassistant/components/here_travel_time/const.py +++ b/homeassistant/components/here_travel_time/const.py @@ -1,4 +1,5 @@ """Constants for the HERE Travel Time integration.""" + from typing import Final DOMAIN = "here_travel_time" diff --git a/homeassistant/components/here_travel_time/coordinator.py b/homeassistant/components/here_travel_time/coordinator.py index dbb17b58336..6591f4cb5cc 100644 --- a/homeassistant/components/here_travel_time/coordinator.py +++ b/homeassistant/components/here_travel_time/coordinator.py @@ -1,4 +1,5 @@ """The HERE Travel Time integration.""" + from __future__ import annotations from datetime import datetime, time, timedelta diff --git a/homeassistant/components/here_travel_time/model.py b/homeassistant/components/here_travel_time/model.py index 433653cbf56..178c0d8c805 100644 --- a/homeassistant/components/here_travel_time/model.py +++ b/homeassistant/components/here_travel_time/model.py @@ -1,4 +1,5 @@ """Model Classes for here_travel_time.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/here_travel_time/sensor.py b/homeassistant/components/here_travel_time/sensor.py index 193a86a3d37..1fd4f8d94bc 100644 --- a/homeassistant/components/here_travel_time/sensor.py +++ b/homeassistant/components/here_travel_time/sensor.py @@ -1,4 +1,5 @@ """Support for HERE travel time sensors.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/hikvision/binary_sensor.py b/homeassistant/components/hikvision/binary_sensor.py index ef8a18ec3ae..2e4af361b38 100644 --- a/homeassistant/components/hikvision/binary_sensor.py +++ b/homeassistant/components/hikvision/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Hikvision event stream events represented as binary sensors.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/hikvisioncam/switch.py b/homeassistant/components/hikvisioncam/switch.py index ea521ec3a6b..c455fcb5bbc 100644 --- a/homeassistant/components/hikvisioncam/switch.py +++ b/homeassistant/components/hikvisioncam/switch.py @@ -1,4 +1,5 @@ """Support turning on/off motion detection on Hikvision cameras.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/hisense_aehw4a1/climate.py b/homeassistant/components/hisense_aehw4a1/climate.py index 0e3fa9981c1..656ba6c68c0 100644 --- a/homeassistant/components/hisense_aehw4a1/climate.py +++ b/homeassistant/components/hisense_aehw4a1/climate.py @@ -1,4 +1,5 @@ """Pyaehw4a1 platform to control of Hisense AEH-W4A1 Climate Devices.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/hisense_aehw4a1/config_flow.py b/homeassistant/components/hisense_aehw4a1/config_flow.py index 8fd651d1782..3d4c83d6f53 100644 --- a/homeassistant/components/hisense_aehw4a1/config_flow.py +++ b/homeassistant/components/hisense_aehw4a1/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Hisense AEH-W4A1 integration.""" + from pyaehw4a1.aehw4a1 import AehW4a1 from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/history/__init__.py b/homeassistant/components/history/__init__.py index de5f994f8c7..365be06fd2d 100644 --- a/homeassistant/components/history/__init__.py +++ b/homeassistant/components/history/__init__.py @@ -1,4 +1,5 @@ """Provide pre-made queries on top of the recorder component.""" + from __future__ import annotations from datetime import datetime as dt, timedelta diff --git a/homeassistant/components/history/helpers.py b/homeassistant/components/history/helpers.py index 7e28e69e5f9..bd477e7e4ed 100644 --- a/homeassistant/components/history/helpers.py +++ b/homeassistant/components/history/helpers.py @@ -1,4 +1,5 @@ """Helpers for the history integration.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/history/websocket_api.py b/homeassistant/components/history/websocket_api.py index dc249ddb035..63142b139bc 100644 --- a/homeassistant/components/history/websocket_api.py +++ b/homeassistant/components/history/websocket_api.py @@ -1,4 +1,5 @@ """Websocket API for the history integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/history_stats/coordinator.py b/homeassistant/components/history_stats/coordinator.py index 6d4d6e55fa9..0ab68adda57 100644 --- a/homeassistant/components/history_stats/coordinator.py +++ b/homeassistant/components/history_stats/coordinator.py @@ -1,4 +1,5 @@ """History stats data coordinator.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/history_stats/data.py b/homeassistant/components/history_stats/data.py index 69e56ba0333..9a26853cbb5 100644 --- a/homeassistant/components/history_stats/data.py +++ b/homeassistant/components/history_stats/data.py @@ -1,4 +1,5 @@ """Manage the history_stats data.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/history_stats/helpers.py b/homeassistant/components/history_stats/helpers.py index 0c914e1fd41..33a45d10735 100644 --- a/homeassistant/components/history_stats/helpers.py +++ b/homeassistant/components/history_stats/helpers.py @@ -1,4 +1,5 @@ """Helpers to make instant statistics about your history.""" + from __future__ import annotations import datetime diff --git a/homeassistant/components/history_stats/sensor.py b/homeassistant/components/history_stats/sensor.py index 7f318b03e06..0134f4682a5 100644 --- a/homeassistant/components/history_stats/sensor.py +++ b/homeassistant/components/history_stats/sensor.py @@ -1,4 +1,5 @@ """Component to make instant statistics about your history.""" + from __future__ import annotations from abc import abstractmethod diff --git a/homeassistant/components/hitron_coda/device_tracker.py b/homeassistant/components/hitron_coda/device_tracker.py index df1189f9e76..ba672e38106 100644 --- a/homeassistant/components/hitron_coda/device_tracker.py +++ b/homeassistant/components/hitron_coda/device_tracker.py @@ -1,4 +1,5 @@ """Support for the Hitron CODA-4582U, provided by Rogers.""" + from __future__ import annotations from collections import namedtuple diff --git a/homeassistant/components/hive/__init__.py b/homeassistant/components/hive/__init__.py index 1a386d3b271..834054dd91c 100644 --- a/homeassistant/components/hive/__init__.py +++ b/homeassistant/components/hive/__init__.py @@ -1,4 +1,5 @@ """Support for the Hive devices and services.""" + from __future__ import annotations from collections.abc import Awaitable, Callable, Coroutine diff --git a/homeassistant/components/hive/alarm_control_panel.py b/homeassistant/components/hive/alarm_control_panel.py index 46cc37751a0..78e8606a43c 100644 --- a/homeassistant/components/hive/alarm_control_panel.py +++ b/homeassistant/components/hive/alarm_control_panel.py @@ -1,4 +1,5 @@ """Support for the Hive alarm.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/hive/binary_sensor.py b/homeassistant/components/hive/binary_sensor.py index 6306b48f733..472395afa9e 100644 --- a/homeassistant/components/hive/binary_sensor.py +++ b/homeassistant/components/hive/binary_sensor.py @@ -1,4 +1,5 @@ """Support for the Hive binary sensors.""" + from datetime import timedelta from homeassistant.components.binary_sensor import ( diff --git a/homeassistant/components/hive/climate.py b/homeassistant/components/hive/climate.py index 8085719d8c5..8c674605b11 100644 --- a/homeassistant/components/hive/climate.py +++ b/homeassistant/components/hive/climate.py @@ -1,4 +1,5 @@ """Support for the Hive climate devices.""" + from datetime import timedelta import logging from typing import Any diff --git a/homeassistant/components/hive/config_flow.py b/homeassistant/components/hive/config_flow.py index 436c1e35da1..3b11e7a8246 100644 --- a/homeassistant/components/hive/config_flow.py +++ b/homeassistant/components/hive/config_flow.py @@ -1,4 +1,5 @@ """Config Flow for Hive.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/hive/const.py b/homeassistant/components/hive/const.py index b7a2be6910f..2c07469185a 100644 --- a/homeassistant/components/hive/const.py +++ b/homeassistant/components/hive/const.py @@ -1,4 +1,5 @@ """Constants for Hive.""" + from homeassistant.const import Platform ATTR_MODE = "mode" diff --git a/homeassistant/components/hive/light.py b/homeassistant/components/hive/light.py index d173751c6c8..ebf9efb3d26 100644 --- a/homeassistant/components/hive/light.py +++ b/homeassistant/components/hive/light.py @@ -1,4 +1,5 @@ """Support for Hive light devices.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/hive/sensor.py b/homeassistant/components/hive/sensor.py index 0849cf39782..e52e608af43 100644 --- a/homeassistant/components/hive/sensor.py +++ b/homeassistant/components/hive/sensor.py @@ -1,4 +1,5 @@ """Support for the Hive sensors.""" + from datetime import timedelta from homeassistant.components.sensor import ( diff --git a/homeassistant/components/hive/switch.py b/homeassistant/components/hive/switch.py index 80e9d485f5b..9f97c8e920b 100644 --- a/homeassistant/components/hive/switch.py +++ b/homeassistant/components/hive/switch.py @@ -1,4 +1,5 @@ """Support for the Hive switches.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/hive/water_heater.py b/homeassistant/components/hive/water_heater.py index 2dbb6cb0230..11f8dddb3bd 100644 --- a/homeassistant/components/hive/water_heater.py +++ b/homeassistant/components/hive/water_heater.py @@ -1,4 +1,5 @@ """Support for hive water heaters.""" + from datetime import timedelta import voluptuous as vol diff --git a/homeassistant/components/hko/__init__.py b/homeassistant/components/hko/__init__.py index a83c1dd2d89..5b06644580e 100644 --- a/homeassistant/components/hko/__init__.py +++ b/homeassistant/components/hko/__init__.py @@ -1,4 +1,5 @@ """The Hong Kong Observatory integration.""" + from __future__ import annotations from hko import LOCATIONS diff --git a/homeassistant/components/hko/config_flow.py b/homeassistant/components/hko/config_flow.py index 17d74f59f8f..aeee7d4aff8 100644 --- a/homeassistant/components/hko/config_flow.py +++ b/homeassistant/components/hko/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Hong Kong Observatory integration.""" + from __future__ import annotations from asyncio import timeout diff --git a/homeassistant/components/hko/const.py b/homeassistant/components/hko/const.py index a9a554850b0..288fdf56682 100644 --- a/homeassistant/components/hko/const.py +++ b/homeassistant/components/hko/const.py @@ -1,4 +1,5 @@ """Constants for the Hong Kong Observatory integration.""" + from hko import LOCATIONS from homeassistant.components.weather import ( diff --git a/homeassistant/components/hko/coordinator.py b/homeassistant/components/hko/coordinator.py index 05280c4a3bd..c7d80ae299e 100644 --- a/homeassistant/components/hko/coordinator.py +++ b/homeassistant/components/hko/coordinator.py @@ -1,4 +1,5 @@ """Weather data coordinator for the HKO API.""" + from asyncio import timeout from datetime import timedelta import logging diff --git a/homeassistant/components/hko/weather.py b/homeassistant/components/hko/weather.py index f4a784c5308..6d3d12d8ab4 100644 --- a/homeassistant/components/hko/weather.py +++ b/homeassistant/components/hko/weather.py @@ -1,4 +1,5 @@ """Support for the HKO service.""" + from homeassistant.components.weather import ( Forecast, WeatherEntity, diff --git a/homeassistant/components/hlk_sw16/errors.py b/homeassistant/components/hlk_sw16/errors.py index 87453737531..01ad3deb4eb 100644 --- a/homeassistant/components/hlk_sw16/errors.py +++ b/homeassistant/components/hlk_sw16/errors.py @@ -1,4 +1,5 @@ """Errors for the HLK-SW16 component.""" + from homeassistant.exceptions import HomeAssistantError diff --git a/homeassistant/components/hlk_sw16/switch.py b/homeassistant/components/hlk_sw16/switch.py index 2189a285ad8..590ab9c4497 100644 --- a/homeassistant/components/hlk_sw16/switch.py +++ b/homeassistant/components/hlk_sw16/switch.py @@ -1,4 +1,5 @@ """Support for HLK-SW16 switches.""" + from typing import Any from homeassistant.components.switch import SwitchEntity diff --git a/homeassistant/components/holiday/__init__.py b/homeassistant/components/holiday/__init__.py index 224b1b01294..4f2c593d38e 100644 --- a/homeassistant/components/holiday/__init__.py +++ b/homeassistant/components/holiday/__init__.py @@ -1,4 +1,5 @@ """The Holiday integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/holiday/calendar.py b/homeassistant/components/holiday/calendar.py index e48cc11d677..57503b340d9 100644 --- a/homeassistant/components/holiday/calendar.py +++ b/homeassistant/components/holiday/calendar.py @@ -1,4 +1,5 @@ """Holiday Calendar.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/holiday/config_flow.py b/homeassistant/components/holiday/config_flow.py index c99efae789d..f9108f02bc9 100644 --- a/homeassistant/components/holiday/config_flow.py +++ b/homeassistant/components/holiday/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Holiday integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/holiday/const.py b/homeassistant/components/holiday/const.py index 5d2a567a488..ed283f82412 100644 --- a/homeassistant/components/holiday/const.py +++ b/homeassistant/components/holiday/const.py @@ -1,4 +1,5 @@ """Constants for the Holiday integration.""" + from typing import Final DOMAIN: Final = "holiday" diff --git a/homeassistant/components/home_connect/__init__.py b/homeassistant/components/home_connect/__init__.py index 79303725249..ebfd6f91c76 100644 --- a/homeassistant/components/home_connect/__init__.py +++ b/homeassistant/components/home_connect/__init__.py @@ -1,4 +1,5 @@ """Support for BSH Home Connect appliances.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/home_connect/sensor.py b/homeassistant/components/home_connect/sensor.py index a01cae5862a..9bd48617fb3 100644 --- a/homeassistant/components/home_connect/sensor.py +++ b/homeassistant/components/home_connect/sensor.py @@ -1,4 +1,5 @@ """Provides a sensor for Home Connect.""" + from datetime import datetime, timedelta import logging from typing import cast diff --git a/homeassistant/components/homeassistant/const.py b/homeassistant/components/homeassistant/const.py index 871ea5a0371..d56ab4397d9 100644 --- a/homeassistant/components/homeassistant/const.py +++ b/homeassistant/components/homeassistant/const.py @@ -1,4 +1,5 @@ """Constants for the Homeassistant integration.""" + from typing import Final import homeassistant.core as ha diff --git a/homeassistant/components/homeassistant/exposed_entities.py b/homeassistant/components/homeassistant/exposed_entities.py index 38c7f8e8128..135b2847520 100644 --- a/homeassistant/components/homeassistant/exposed_entities.py +++ b/homeassistant/components/homeassistant/exposed_entities.py @@ -1,4 +1,5 @@ """Control which entities are exposed to voice assistants.""" + from __future__ import annotations from collections.abc import Callable, Mapping diff --git a/homeassistant/components/homeassistant/logbook.py b/homeassistant/components/homeassistant/logbook.py index 60e8794799d..12d6c66b69c 100644 --- a/homeassistant/components/homeassistant/logbook.py +++ b/homeassistant/components/homeassistant/logbook.py @@ -1,4 +1,5 @@ """Describe homeassistant logbook events.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/homeassistant/scene.py b/homeassistant/components/homeassistant/scene.py index f8fd901a18a..9d03b35e079 100644 --- a/homeassistant/components/homeassistant/scene.py +++ b/homeassistant/components/homeassistant/scene.py @@ -1,4 +1,5 @@ """Allow users to set and activate scenes.""" + from __future__ import annotations from collections.abc import Mapping, ValuesView diff --git a/homeassistant/components/homeassistant/system_health.py b/homeassistant/components/homeassistant/system_health.py index 488328b6e4e..8a51b9cd418 100644 --- a/homeassistant/components/homeassistant/system_health.py +++ b/homeassistant/components/homeassistant/system_health.py @@ -1,4 +1,5 @@ """Provide info to system health.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homeassistant/triggers/event.py b/homeassistant/components/homeassistant/triggers/event.py index 37a91d06d1a..e045ece12ba 100644 --- a/homeassistant/components/homeassistant/triggers/event.py +++ b/homeassistant/components/homeassistant/triggers/event.py @@ -1,4 +1,5 @@ """Offer event listening automation rules.""" + from __future__ import annotations from collections.abc import ItemsView diff --git a/homeassistant/components/homeassistant/triggers/numeric_state.py b/homeassistant/components/homeassistant/triggers/numeric_state.py index dad57bbcdb3..713c72acb89 100644 --- a/homeassistant/components/homeassistant/triggers/numeric_state.py +++ b/homeassistant/components/homeassistant/triggers/numeric_state.py @@ -1,4 +1,5 @@ """Offer numeric state listening automation rules.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/homeassistant/triggers/state.py b/homeassistant/components/homeassistant/triggers/state.py index 061c2468c30..a728a8f42e4 100644 --- a/homeassistant/components/homeassistant/triggers/state.py +++ b/homeassistant/components/homeassistant/triggers/state.py @@ -1,4 +1,5 @@ """Offer state listening automation rules.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/homeassistant/triggers/time.py b/homeassistant/components/homeassistant/triggers/time.py index 3cb8809a7ad..4f2ac9e8480 100644 --- a/homeassistant/components/homeassistant/triggers/time.py +++ b/homeassistant/components/homeassistant/triggers/time.py @@ -1,4 +1,5 @@ """Offer time listening automation rules.""" + from datetime import datetime from functools import partial diff --git a/homeassistant/components/homeassistant/triggers/time_pattern.py b/homeassistant/components/homeassistant/triggers/time_pattern.py index d8ac55eb04f..df49a79bcb6 100644 --- a/homeassistant/components/homeassistant/triggers/time_pattern.py +++ b/homeassistant/components/homeassistant/triggers/time_pattern.py @@ -1,4 +1,5 @@ """Offer time listening automation rules.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/homeassistant_alerts/__init__.py b/homeassistant/components/homeassistant_alerts/__init__.py index f391b990761..6e6aaa0838e 100644 --- a/homeassistant/components/homeassistant_alerts/__init__.py +++ b/homeassistant/components/homeassistant_alerts/__init__.py @@ -1,4 +1,5 @@ """The Home Assistant alerts integration.""" + from __future__ import annotations import dataclasses diff --git a/homeassistant/components/homeassistant_green/__init__.py b/homeassistant/components/homeassistant_green/__init__.py index ed86723ab94..2d35b5bbed3 100644 --- a/homeassistant/components/homeassistant_green/__init__.py +++ b/homeassistant/components/homeassistant_green/__init__.py @@ -1,4 +1,5 @@ """The Home Assistant Green integration.""" + from __future__ import annotations from homeassistant.components.hassio import get_os_info, is_hassio diff --git a/homeassistant/components/homeassistant_green/config_flow.py b/homeassistant/components/homeassistant_green/config_flow.py index 83b16ac9799..4b71c7f1056 100644 --- a/homeassistant/components/homeassistant_green/config_flow.py +++ b/homeassistant/components/homeassistant_green/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the Home Assistant Green integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/homeassistant_green/hardware.py b/homeassistant/components/homeassistant_green/hardware.py index c7b1641c09c..0537d17620b 100644 --- a/homeassistant/components/homeassistant_green/hardware.py +++ b/homeassistant/components/homeassistant_green/hardware.py @@ -1,4 +1,5 @@ """The Home Assistant Green hardware platform.""" + from __future__ import annotations from homeassistant.components.hardware.models import BoardInfo, HardwareInfo diff --git a/homeassistant/components/homeassistant_hardware/__init__.py b/homeassistant/components/homeassistant_hardware/__init__.py index 057cdd3b0db..c33dabe1ec8 100644 --- a/homeassistant/components/homeassistant_hardware/__init__.py +++ b/homeassistant/components/homeassistant_hardware/__init__.py @@ -1,4 +1,5 @@ """The Home Assistant Hardware integration.""" + from __future__ import annotations from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/homeassistant_hardware/silabs_multiprotocol_addon.py b/homeassistant/components/homeassistant_hardware/silabs_multiprotocol_addon.py index 5a1cf1d5421..535d1706737 100644 --- a/homeassistant/components/homeassistant_hardware/silabs_multiprotocol_addon.py +++ b/homeassistant/components/homeassistant_hardware/silabs_multiprotocol_addon.py @@ -1,4 +1,5 @@ """Manage the Silicon Labs Multiprotocol add-on.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/homeassistant_sky_connect/__init__.py b/homeassistant/components/homeassistant_sky_connect/__init__.py index 4880d2e375f..763c421350f 100644 --- a/homeassistant/components/homeassistant_sky_connect/__init__.py +++ b/homeassistant/components/homeassistant_sky_connect/__init__.py @@ -1,4 +1,5 @@ """The Home Assistant SkyConnect integration.""" + from __future__ import annotations from homeassistant.components import usb diff --git a/homeassistant/components/homeassistant_sky_connect/config_flow.py b/homeassistant/components/homeassistant_sky_connect/config_flow.py index 002fc9c4f62..4e4cbfe0a03 100644 --- a/homeassistant/components/homeassistant_sky_connect/config_flow.py +++ b/homeassistant/components/homeassistant_sky_connect/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the Home Assistant SkyConnect integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homeassistant_sky_connect/hardware.py b/homeassistant/components/homeassistant_sky_connect/hardware.py index bd752278397..1c32bce531b 100644 --- a/homeassistant/components/homeassistant_sky_connect/hardware.py +++ b/homeassistant/components/homeassistant_sky_connect/hardware.py @@ -1,4 +1,5 @@ """The Home Assistant SkyConnect hardware platform.""" + from __future__ import annotations from homeassistant.components.hardware.models import HardwareInfo, USBInfo diff --git a/homeassistant/components/homeassistant_sky_connect/util.py b/homeassistant/components/homeassistant_sky_connect/util.py index 7a87964f5c4..84aa858c847 100644 --- a/homeassistant/components/homeassistant_sky_connect/util.py +++ b/homeassistant/components/homeassistant_sky_connect/util.py @@ -1,4 +1,5 @@ """Utility functions for Home Assistant SkyConnect integration.""" + from __future__ import annotations from homeassistant.components import usb diff --git a/homeassistant/components/homeassistant_yellow/__init__.py b/homeassistant/components/homeassistant_yellow/__init__.py index 84ad464e779..14c2de2c9a1 100644 --- a/homeassistant/components/homeassistant_yellow/__init__.py +++ b/homeassistant/components/homeassistant_yellow/__init__.py @@ -1,4 +1,5 @@ """The Home Assistant Yellow integration.""" + from __future__ import annotations from homeassistant.components.hassio import get_os_info, is_hassio diff --git a/homeassistant/components/homeassistant_yellow/config_flow.py b/homeassistant/components/homeassistant_yellow/config_flow.py index 94dd511cac5..d2212a968db 100644 --- a/homeassistant/components/homeassistant_yellow/config_flow.py +++ b/homeassistant/components/homeassistant_yellow/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the Home Assistant Yellow integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/homeassistant_yellow/hardware.py b/homeassistant/components/homeassistant_yellow/hardware.py index 0749ca8edc6..2b9ee0673db 100644 --- a/homeassistant/components/homeassistant_yellow/hardware.py +++ b/homeassistant/components/homeassistant_yellow/hardware.py @@ -1,4 +1,5 @@ """The Home Assistant Yellow hardware platform.""" + from __future__ import annotations from homeassistant.components.hardware.models import BoardInfo, HardwareInfo diff --git a/homeassistant/components/homekit/__init__.py b/homeassistant/components/homekit/__init__.py index 76256ea1a7e..376962f376e 100644 --- a/homeassistant/components/homekit/__init__.py +++ b/homeassistant/components/homekit/__init__.py @@ -1,4 +1,5 @@ """Support for Apple HomeKit.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/homekit/accessories.py b/homeassistant/components/homekit/accessories.py index 25b1c143f54..5303b2a6736 100644 --- a/homeassistant/components/homekit/accessories.py +++ b/homeassistant/components/homekit/accessories.py @@ -1,4 +1,5 @@ """Extend the basic Accessory and Bridge functions.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homekit/aidmanager.py b/homeassistant/components/homekit/aidmanager.py index 43beaaa8dc6..36df47e8a93 100644 --- a/homeassistant/components/homekit/aidmanager.py +++ b/homeassistant/components/homekit/aidmanager.py @@ -8,6 +8,7 @@ can't change the hash without causing breakages for HA users. This module generates and stores them in a HA storage. """ + from __future__ import annotations from collections.abc import Generator diff --git a/homeassistant/components/homekit/config_flow.py b/homeassistant/components/homekit/config_flow.py index 772e2bbce1d..30fb80cbdfc 100644 --- a/homeassistant/components/homekit/config_flow.py +++ b/homeassistant/components/homekit/config_flow.py @@ -1,4 +1,5 @@ """Config flow for HomeKit integration.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/homekit/diagnostics.py b/homeassistant/components/homekit/diagnostics.py index 347a3df0dd4..f31dd268b26 100644 --- a/homeassistant/components/homekit/diagnostics.py +++ b/homeassistant/components/homekit/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for HomeKit.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homekit/iidmanager.py b/homeassistant/components/homekit/iidmanager.py index f44d76d3ee7..d6daeb49f82 100644 --- a/homeassistant/components/homekit/iidmanager.py +++ b/homeassistant/components/homekit/iidmanager.py @@ -5,6 +5,7 @@ be stable between reboots and upgrades. This module generates and stores them in a HA storage. """ + from __future__ import annotations from uuid import UUID diff --git a/homeassistant/components/homekit/logbook.py b/homeassistant/components/homekit/logbook.py index e71695883a8..c1609350d68 100644 --- a/homeassistant/components/homekit/logbook.py +++ b/homeassistant/components/homekit/logbook.py @@ -1,4 +1,5 @@ """Describe logbook events.""" + from collections.abc import Callable from typing import Any diff --git a/homeassistant/components/homekit/models.py b/homeassistant/components/homekit/models.py index e96af00fead..fee081c9e51 100644 --- a/homeassistant/components/homekit/models.py +++ b/homeassistant/components/homekit/models.py @@ -1,4 +1,5 @@ """Models for the HomeKit component.""" + from dataclasses import dataclass from typing import TYPE_CHECKING diff --git a/homeassistant/components/homekit/type_lights.py b/homeassistant/components/homekit/type_lights.py index b45e9e1c17b..cb446ea551c 100644 --- a/homeassistant/components/homekit/type_lights.py +++ b/homeassistant/components/homekit/type_lights.py @@ -1,4 +1,5 @@ """Class to hold all light accessories.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/homekit/type_remotes.py b/homeassistant/components/homekit/type_remotes.py index e03b14f943a..75b3a5200b8 100644 --- a/homeassistant/components/homekit/type_remotes.py +++ b/homeassistant/components/homekit/type_remotes.py @@ -1,4 +1,5 @@ """Class to hold remote accessories.""" + from abc import ABC, abstractmethod import logging from typing import Any diff --git a/homeassistant/components/homekit/type_sensors.py b/homeassistant/components/homekit/type_sensors.py index dbf2808a55a..bfa97756bb4 100644 --- a/homeassistant/components/homekit/type_sensors.py +++ b/homeassistant/components/homekit/type_sensors.py @@ -1,4 +1,5 @@ """Class to hold all sensor accessories.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/homekit/type_switches.py b/homeassistant/components/homekit/type_switches.py index 5c0c2c74f0a..86861417bdb 100644 --- a/homeassistant/components/homekit/type_switches.py +++ b/homeassistant/components/homekit/type_switches.py @@ -1,4 +1,5 @@ """Class to hold all switch accessories.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homekit/type_triggers.py b/homeassistant/components/homekit/type_triggers.py index 625ed0a4a44..b958817bbac 100644 --- a/homeassistant/components/homekit/type_triggers.py +++ b/homeassistant/components/homekit/type_triggers.py @@ -1,4 +1,5 @@ """Class to hold all sensor accessories.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homekit/util.py b/homeassistant/components/homekit/util.py index 8a51f35564e..35e60bff2df 100644 --- a/homeassistant/components/homekit/util.py +++ b/homeassistant/components/homekit/util.py @@ -1,4 +1,5 @@ """Collection of useful functions for the HomeKit component.""" + from __future__ import annotations import io diff --git a/homeassistant/components/homekit_controller/__init__.py b/homeassistant/components/homekit_controller/__init__.py index e3ff4d47fcf..9244a9f95d8 100644 --- a/homeassistant/components/homekit_controller/__init__.py +++ b/homeassistant/components/homekit_controller/__init__.py @@ -1,4 +1,5 @@ """Support for Homekit device discovery.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/homekit_controller/alarm_control_panel.py b/homeassistant/components/homekit_controller/alarm_control_panel.py index f1c2440ce9e..1cb94926e8b 100644 --- a/homeassistant/components/homekit_controller/alarm_control_panel.py +++ b/homeassistant/components/homekit_controller/alarm_control_panel.py @@ -1,4 +1,5 @@ """Support for Homekit Alarm Control Panel.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homekit_controller/binary_sensor.py b/homeassistant/components/homekit_controller/binary_sensor.py index 93bf20ef493..26e19c8944a 100644 --- a/homeassistant/components/homekit_controller/binary_sensor.py +++ b/homeassistant/components/homekit_controller/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Homekit motion sensors.""" + from __future__ import annotations from aiohomekit.model.characteristics import CharacteristicsTypes diff --git a/homeassistant/components/homekit_controller/button.py b/homeassistant/components/homekit_controller/button.py index a0c61578e66..abd00f02aa0 100644 --- a/homeassistant/components/homekit_controller/button.py +++ b/homeassistant/components/homekit_controller/button.py @@ -3,6 +3,7 @@ These are mostly used where a HomeKit accessory exposes additional non-standard characteristics that don't map to a Home Assistant feature. """ + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/homekit_controller/camera.py b/homeassistant/components/homekit_controller/camera.py index 35a4b089641..4332032867a 100644 --- a/homeassistant/components/homekit_controller/camera.py +++ b/homeassistant/components/homekit_controller/camera.py @@ -1,4 +1,5 @@ """Support for Homekit cameras.""" + from __future__ import annotations from aiohomekit.model import Accessory diff --git a/homeassistant/components/homekit_controller/climate.py b/homeassistant/components/homekit_controller/climate.py index 0ca85da3fa2..7fe11b8f875 100644 --- a/homeassistant/components/homekit_controller/climate.py +++ b/homeassistant/components/homekit_controller/climate.py @@ -1,4 +1,5 @@ """Support for Homekit climate devices.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homekit_controller/config_flow.py b/homeassistant/components/homekit_controller/config_flow.py index f0931e382dd..e48cb069dfe 100644 --- a/homeassistant/components/homekit_controller/config_flow.py +++ b/homeassistant/components/homekit_controller/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure homekit_controller.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homekit_controller/connection.py b/homeassistant/components/homekit_controller/connection.py index a3c68fffe64..66552978e8d 100644 --- a/homeassistant/components/homekit_controller/connection.py +++ b/homeassistant/components/homekit_controller/connection.py @@ -1,4 +1,5 @@ """Helpers for managing a pairing with a HomeKit accessory or bridge.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/homekit_controller/cover.py b/homeassistant/components/homekit_controller/cover.py index f99563843c7..b15ce645a29 100644 --- a/homeassistant/components/homekit_controller/cover.py +++ b/homeassistant/components/homekit_controller/cover.py @@ -1,4 +1,5 @@ """Support for Homekit covers.""" + from __future__ import annotations from typing import TYPE_CHECKING, Any diff --git a/homeassistant/components/homekit_controller/device_trigger.py b/homeassistant/components/homekit_controller/device_trigger.py index 6dc97bf6821..c88928e1c2e 100644 --- a/homeassistant/components/homekit_controller/device_trigger.py +++ b/homeassistant/components/homekit_controller/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for homekit devices.""" + from __future__ import annotations from collections.abc import Callable, Generator diff --git a/homeassistant/components/homekit_controller/diagnostics.py b/homeassistant/components/homekit_controller/diagnostics.py index 9b17c0c2fe7..bfd034807c9 100644 --- a/homeassistant/components/homekit_controller/diagnostics.py +++ b/homeassistant/components/homekit_controller/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for HomeKit Controller.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homekit_controller/entity.py b/homeassistant/components/homekit_controller/entity.py index 496866299d6..136c063f280 100644 --- a/homeassistant/components/homekit_controller/entity.py +++ b/homeassistant/components/homekit_controller/entity.py @@ -1,4 +1,5 @@ """Homekit Controller entities.""" + from __future__ import annotations import contextlib diff --git a/homeassistant/components/homekit_controller/event.py b/homeassistant/components/homekit_controller/event.py index 8f3d71682f1..7c9052f984b 100644 --- a/homeassistant/components/homekit_controller/event.py +++ b/homeassistant/components/homekit_controller/event.py @@ -1,4 +1,5 @@ """Support for Homekit motion sensors.""" + from __future__ import annotations from aiohomekit.model.characteristics import CharacteristicsTypes diff --git a/homeassistant/components/homekit_controller/fan.py b/homeassistant/components/homekit_controller/fan.py index 1b2d572f2b6..39df2b7ce51 100644 --- a/homeassistant/components/homekit_controller/fan.py +++ b/homeassistant/components/homekit_controller/fan.py @@ -1,4 +1,5 @@ """Support for Homekit fans.""" + from __future__ import annotations from typing import TYPE_CHECKING, Any diff --git a/homeassistant/components/homekit_controller/humidifier.py b/homeassistant/components/homekit_controller/humidifier.py index b5e67e7f1a4..fef8fed33ad 100644 --- a/homeassistant/components/homekit_controller/humidifier.py +++ b/homeassistant/components/homekit_controller/humidifier.py @@ -1,4 +1,5 @@ """Support for HomeKit Controller humidifier.""" + from __future__ import annotations from typing import TYPE_CHECKING, Any diff --git a/homeassistant/components/homekit_controller/light.py b/homeassistant/components/homekit_controller/light.py index fd3bf4f800b..b314ffe85de 100644 --- a/homeassistant/components/homekit_controller/light.py +++ b/homeassistant/components/homekit_controller/light.py @@ -1,4 +1,5 @@ """Support for Homekit lights.""" + from __future__ import annotations from typing import TYPE_CHECKING, Any diff --git a/homeassistant/components/homekit_controller/lock.py b/homeassistant/components/homekit_controller/lock.py index df03a1fef34..8e1bcd424d4 100644 --- a/homeassistant/components/homekit_controller/lock.py +++ b/homeassistant/components/homekit_controller/lock.py @@ -1,4 +1,5 @@ """Support for HomeKit Controller locks.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homekit_controller/media_player.py b/homeassistant/components/homekit_controller/media_player.py index 90d1ba754f2..4232d1b7649 100644 --- a/homeassistant/components/homekit_controller/media_player.py +++ b/homeassistant/components/homekit_controller/media_player.py @@ -1,4 +1,5 @@ """Support for HomeKit Controller Televisions.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homekit_controller/number.py b/homeassistant/components/homekit_controller/number.py index e2d856126da..340d31c91ae 100644 --- a/homeassistant/components/homekit_controller/number.py +++ b/homeassistant/components/homekit_controller/number.py @@ -3,6 +3,7 @@ These are mostly used where a HomeKit accessory exposes additional non-standard characteristics that don't map to a Home Assistant feature. """ + from __future__ import annotations from aiohomekit.model.characteristics import Characteristic, CharacteristicsTypes diff --git a/homeassistant/components/homekit_controller/select.py b/homeassistant/components/homekit_controller/select.py index be1a7313301..6ae42a69940 100644 --- a/homeassistant/components/homekit_controller/select.py +++ b/homeassistant/components/homekit_controller/select.py @@ -1,4 +1,5 @@ """Support for Homekit select entities.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/homekit_controller/sensor.py b/homeassistant/components/homekit_controller/sensor.py index 28bb0cd309c..059be5bad99 100644 --- a/homeassistant/components/homekit_controller/sensor.py +++ b/homeassistant/components/homekit_controller/sensor.py @@ -1,4 +1,5 @@ """Support for Homekit sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/homekit_controller/switch.py b/homeassistant/components/homekit_controller/switch.py index b7e1b27ef7f..65f98ed8f5e 100644 --- a/homeassistant/components/homekit_controller/switch.py +++ b/homeassistant/components/homekit_controller/switch.py @@ -1,4 +1,5 @@ """Support for Homekit switches.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/homekit_controller/utils.py b/homeassistant/components/homekit_controller/utils.py index 489dee5584c..2f94f5bac92 100644 --- a/homeassistant/components/homekit_controller/utils.py +++ b/homeassistant/components/homekit_controller/utils.py @@ -1,4 +1,5 @@ """Helper functions for the homekit_controller component.""" + from functools import lru_cache from typing import cast diff --git a/homeassistant/components/homematic/__init__.py b/homeassistant/components/homematic/__init__.py index 364bfd11210..6eb01728df0 100644 --- a/homeassistant/components/homematic/__init__.py +++ b/homeassistant/components/homematic/__init__.py @@ -1,4 +1,5 @@ """Support for HomeMatic devices.""" + from datetime import datetime from functools import partial import logging diff --git a/homeassistant/components/homematic/binary_sensor.py b/homeassistant/components/homematic/binary_sensor.py index ba6d9781293..0d94c2bb78b 100644 --- a/homeassistant/components/homematic/binary_sensor.py +++ b/homeassistant/components/homematic/binary_sensor.py @@ -1,4 +1,5 @@ """Support for HomeMatic binary sensors.""" + from __future__ import annotations from homeassistant.components.binary_sensor import ( diff --git a/homeassistant/components/homematic/climate.py b/homeassistant/components/homematic/climate.py index 76d9dff4d46..f0e15b7a055 100644 --- a/homeassistant/components/homematic/climate.py +++ b/homeassistant/components/homematic/climate.py @@ -1,4 +1,5 @@ """Support for Homematic thermostats.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematic/cover.py b/homeassistant/components/homematic/cover.py index d9fb44219f6..b9f4a4fa96a 100644 --- a/homeassistant/components/homematic/cover.py +++ b/homeassistant/components/homematic/cover.py @@ -1,4 +1,5 @@ """Support for HomeMatic covers.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematic/entity.py b/homeassistant/components/homematic/entity.py index 700ef5cdc94..b728e85f959 100644 --- a/homeassistant/components/homematic/entity.py +++ b/homeassistant/components/homematic/entity.py @@ -1,4 +1,5 @@ """Homematic base entity.""" + from __future__ import annotations from abc import abstractmethod diff --git a/homeassistant/components/homematic/light.py b/homeassistant/components/homematic/light.py index 39e6df9d0ec..b05cc6a46d6 100644 --- a/homeassistant/components/homematic/light.py +++ b/homeassistant/components/homematic/light.py @@ -1,4 +1,5 @@ """Support for Homematic lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematic/lock.py b/homeassistant/components/homematic/lock.py index abca46ddf58..bcd5c7ce7a0 100644 --- a/homeassistant/components/homematic/lock.py +++ b/homeassistant/components/homematic/lock.py @@ -1,4 +1,5 @@ """Support for Homematic locks.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematic/notify.py b/homeassistant/components/homematic/notify.py index 33a06336104..6b7e71bb7a9 100644 --- a/homeassistant/components/homematic/notify.py +++ b/homeassistant/components/homematic/notify.py @@ -1,4 +1,5 @@ """Notification support for Homematic.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/homematic/sensor.py b/homeassistant/components/homematic/sensor.py index 8b5d7b6bff1..eebcad95446 100644 --- a/homeassistant/components/homematic/sensor.py +++ b/homeassistant/components/homematic/sensor.py @@ -1,4 +1,5 @@ """Support for HomeMatic sensors.""" + from __future__ import annotations from copy import copy diff --git a/homeassistant/components/homematic/switch.py b/homeassistant/components/homematic/switch.py index 7accb011ebf..5f7c1f93dc8 100644 --- a/homeassistant/components/homematic/switch.py +++ b/homeassistant/components/homematic/switch.py @@ -1,4 +1,5 @@ """Support for HomeMatic switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematicip_cloud/alarm_control_panel.py b/homeassistant/components/homematicip_cloud/alarm_control_panel.py index 1a2f2293c1c..2913896d511 100644 --- a/homeassistant/components/homematicip_cloud/alarm_control_panel.py +++ b/homeassistant/components/homematicip_cloud/alarm_control_panel.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud alarm control panel.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homematicip_cloud/binary_sensor.py b/homeassistant/components/homematicip_cloud/binary_sensor.py index 2afe803e1eb..b3322107bfa 100644 --- a/homeassistant/components/homematicip_cloud/binary_sensor.py +++ b/homeassistant/components/homematicip_cloud/binary_sensor.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud binary sensor.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematicip_cloud/button.py b/homeassistant/components/homematicip_cloud/button.py index 3fb8ebe20bd..7537c15fc9b 100644 --- a/homeassistant/components/homematicip_cloud/button.py +++ b/homeassistant/components/homematicip_cloud/button.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud button devices.""" + from __future__ import annotations from homematicip.aio.device import AsyncWallMountedGarageDoorController diff --git a/homeassistant/components/homematicip_cloud/climate.py b/homeassistant/components/homematicip_cloud/climate.py index 63b78e91a2f..9c79e1a0c55 100644 --- a/homeassistant/components/homematicip_cloud/climate.py +++ b/homeassistant/components/homematicip_cloud/climate.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud climate devices.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematicip_cloud/config_flow.py b/homeassistant/components/homematicip_cloud/config_flow.py index 643a525ea25..c2277e16c79 100644 --- a/homeassistant/components/homematicip_cloud/config_flow.py +++ b/homeassistant/components/homematicip_cloud/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the HomematicIP Cloud component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematicip_cloud/cover.py b/homeassistant/components/homematicip_cloud/cover.py index f5a9919579c..17e1b7a94f1 100644 --- a/homeassistant/components/homematicip_cloud/cover.py +++ b/homeassistant/components/homematicip_cloud/cover.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud cover devices.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematicip_cloud/errors.py b/homeassistant/components/homematicip_cloud/errors.py index 1102cde6fbe..bbee58f7a41 100644 --- a/homeassistant/components/homematicip_cloud/errors.py +++ b/homeassistant/components/homematicip_cloud/errors.py @@ -1,4 +1,5 @@ """Errors for the HomematicIP Cloud component.""" + from homeassistant.exceptions import HomeAssistantError diff --git a/homeassistant/components/homematicip_cloud/generic_entity.py b/homeassistant/components/homematicip_cloud/generic_entity.py index 46d036c777b..c75649e6886 100644 --- a/homeassistant/components/homematicip_cloud/generic_entity.py +++ b/homeassistant/components/homematicip_cloud/generic_entity.py @@ -1,4 +1,5 @@ """Generic entity for the HomematicIP Cloud component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homematicip_cloud/hap.py b/homeassistant/components/homematicip_cloud/hap.py index b40b6ec56f6..058b7ec6c00 100644 --- a/homeassistant/components/homematicip_cloud/hap.py +++ b/homeassistant/components/homematicip_cloud/hap.py @@ -1,4 +1,5 @@ """Access point for the HomematicIP Cloud component.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/homematicip_cloud/helpers.py b/homeassistant/components/homematicip_cloud/helpers.py index 4647e553382..43edca4774a 100644 --- a/homeassistant/components/homematicip_cloud/helpers.py +++ b/homeassistant/components/homematicip_cloud/helpers.py @@ -1,4 +1,5 @@ """Helper functions for Homematicip Cloud Integration.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/homematicip_cloud/light.py b/homeassistant/components/homematicip_cloud/light.py index 3000024db43..6a9bd5a3c4e 100644 --- a/homeassistant/components/homematicip_cloud/light.py +++ b/homeassistant/components/homematicip_cloud/light.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematicip_cloud/lock.py b/homeassistant/components/homematicip_cloud/lock.py index 563f0103060..cf98828598f 100644 --- a/homeassistant/components/homematicip_cloud/lock.py +++ b/homeassistant/components/homematicip_cloud/lock.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud lock devices.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homematicip_cloud/sensor.py b/homeassistant/components/homematicip_cloud/sensor.py index 04fba2cfd92..d344639bbc9 100644 --- a/homeassistant/components/homematicip_cloud/sensor.py +++ b/homeassistant/components/homematicip_cloud/sensor.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud sensors.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematicip_cloud/services.py b/homeassistant/components/homematicip_cloud/services.py index 38ce6de7caf..37cda9e7683 100644 --- a/homeassistant/components/homematicip_cloud/services.py +++ b/homeassistant/components/homematicip_cloud/services.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud devices.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homematicip_cloud/switch.py b/homeassistant/components/homematicip_cloud/switch.py index 2b5f2f01cd3..1fa3007c863 100644 --- a/homeassistant/components/homematicip_cloud/switch.py +++ b/homeassistant/components/homematicip_cloud/switch.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/homematicip_cloud/weather.py b/homeassistant/components/homematicip_cloud/weather.py index 573f291d557..34e3f58d6ef 100644 --- a/homeassistant/components/homematicip_cloud/weather.py +++ b/homeassistant/components/homematicip_cloud/weather.py @@ -1,4 +1,5 @@ """Support for HomematicIP Cloud weather devices.""" + from __future__ import annotations from homematicip.aio.device import ( diff --git a/homeassistant/components/homewizard/__init__.py b/homeassistant/components/homewizard/__init__.py index 35b303a62e3..6efcd7be75b 100644 --- a/homeassistant/components/homewizard/__init__.py +++ b/homeassistant/components/homewizard/__init__.py @@ -1,4 +1,5 @@ """The Homewizard integration.""" + from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import ConfigEntryNotReady diff --git a/homeassistant/components/homewizard/config_flow.py b/homeassistant/components/homewizard/config_flow.py index 067007589bb..795edfaf629 100644 --- a/homeassistant/components/homewizard/config_flow.py +++ b/homeassistant/components/homewizard/config_flow.py @@ -1,4 +1,5 @@ """Config flow for HomeWizard.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/homewizard/const.py b/homeassistant/components/homewizard/const.py index f1a1bee2568..8cee8350268 100644 --- a/homeassistant/components/homewizard/const.py +++ b/homeassistant/components/homewizard/const.py @@ -1,4 +1,5 @@ """Constants for the Homewizard integration.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/homewizard/coordinator.py b/homeassistant/components/homewizard/coordinator.py index e38b1d54471..22133a04234 100644 --- a/homeassistant/components/homewizard/coordinator.py +++ b/homeassistant/components/homewizard/coordinator.py @@ -1,4 +1,5 @@ """Update coordinator for HomeWizard.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/homewizard/diagnostics.py b/homeassistant/components/homewizard/diagnostics.py index b8103f7a4cb..82d9b7d72d1 100644 --- a/homeassistant/components/homewizard/diagnostics.py +++ b/homeassistant/components/homewizard/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for P1 Monitor.""" + from __future__ import annotations from dataclasses import asdict diff --git a/homeassistant/components/homewizard/entity.py b/homeassistant/components/homewizard/entity.py index 2090cc363ba..9ba54c8218c 100644 --- a/homeassistant/components/homewizard/entity.py +++ b/homeassistant/components/homewizard/entity.py @@ -1,4 +1,5 @@ """Base entity for the HomeWizard integration.""" + from __future__ import annotations from homeassistant.const import ATTR_CONNECTIONS, ATTR_IDENTIFIERS diff --git a/homeassistant/components/homewizard/helpers.py b/homeassistant/components/homewizard/helpers.py index 4c3ae76a327..a69e09204e7 100644 --- a/homeassistant/components/homewizard/helpers.py +++ b/homeassistant/components/homewizard/helpers.py @@ -1,4 +1,5 @@ """Helpers for HomeWizard.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/homewizard/number.py b/homeassistant/components/homewizard/number.py index 6145db125a1..c6261c62a9b 100644 --- a/homeassistant/components/homewizard/number.py +++ b/homeassistant/components/homewizard/number.py @@ -1,4 +1,5 @@ """Creates HomeWizard Number entities.""" + from __future__ import annotations from homeassistant.components.number import NumberEntity diff --git a/homeassistant/components/homewizard/sensor.py b/homeassistant/components/homewizard/sensor.py index e544ee601c0..19102e5b985 100644 --- a/homeassistant/components/homewizard/sensor.py +++ b/homeassistant/components/homewizard/sensor.py @@ -1,4 +1,5 @@ """Creates HomeWizard sensor entities.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/homewizard/switch.py b/homeassistant/components/homewizard/switch.py index 72e0f43a2cf..eb954709be0 100644 --- a/homeassistant/components/homewizard/switch.py +++ b/homeassistant/components/homewizard/switch.py @@ -1,4 +1,5 @@ """Creates HomeWizard Energy switch entities.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/homeworks/__init__.py b/homeassistant/components/homeworks/__init__.py index 3d9de889ae7..3ab833e2b08 100644 --- a/homeassistant/components/homeworks/__init__.py +++ b/homeassistant/components/homeworks/__init__.py @@ -1,4 +1,5 @@ """Support for Lutron Homeworks Series 4 and 8 systems.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/homeworks/button.py b/homeassistant/components/homeworks/button.py index 04cf3594e0e..c8cb616d95b 100644 --- a/homeassistant/components/homeworks/button.py +++ b/homeassistant/components/homeworks/button.py @@ -1,4 +1,5 @@ """Support for Lutron Homeworks buttons.""" + from __future__ import annotations from time import sleep diff --git a/homeassistant/components/homeworks/config_flow.py b/homeassistant/components/homeworks/config_flow.py index 269abd70535..68f6aa37c27 100644 --- a/homeassistant/components/homeworks/config_flow.py +++ b/homeassistant/components/homeworks/config_flow.py @@ -1,4 +1,5 @@ """Lutron Homeworks Series 4 and 8 config flow.""" + from __future__ import annotations from functools import partial diff --git a/homeassistant/components/homeworks/const.py b/homeassistant/components/homeworks/const.py index c0d4439ff93..a4645f1d357 100644 --- a/homeassistant/components/homeworks/const.py +++ b/homeassistant/components/homeworks/const.py @@ -1,4 +1,5 @@ """Constants for the Lutron Homeworks integration.""" + from __future__ import annotations DOMAIN = "homeworks" diff --git a/homeassistant/components/homeworks/light.py b/homeassistant/components/homeworks/light.py index a9b0e2587df..3e3c199c75c 100644 --- a/homeassistant/components/homeworks/light.py +++ b/homeassistant/components/homeworks/light.py @@ -1,4 +1,5 @@ """Support for Lutron Homeworks lights.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/honeywell/__init__.py b/homeassistant/components/honeywell/__init__.py index f58db72a07e..c1c46e2b7af 100644 --- a/homeassistant/components/honeywell/__init__.py +++ b/homeassistant/components/honeywell/__init__.py @@ -1,4 +1,5 @@ """Support for Honeywell (US) Total Connect Comfort climate systems.""" + from dataclasses import dataclass import aiosomecomfort diff --git a/homeassistant/components/honeywell/climate.py b/homeassistant/components/honeywell/climate.py index fb8537ce36b..5ac5e8a2472 100644 --- a/homeassistant/components/honeywell/climate.py +++ b/homeassistant/components/honeywell/climate.py @@ -1,4 +1,5 @@ """Support for Honeywell (US) Total Connect Comfort climate systems.""" + from __future__ import annotations import datetime diff --git a/homeassistant/components/honeywell/config_flow.py b/homeassistant/components/honeywell/config_flow.py index 8fb05f7e47d..85877046bc0 100644 --- a/homeassistant/components/honeywell/config_flow.py +++ b/homeassistant/components/honeywell/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the honeywell integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/honeywell/diagnostics.py b/homeassistant/components/honeywell/diagnostics.py index 4aebfc4c905..b489eb4a596 100644 --- a/homeassistant/components/honeywell/diagnostics.py +++ b/homeassistant/components/honeywell/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Honeywell.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/honeywell/sensor.py b/homeassistant/components/honeywell/sensor.py index 0841b7df1cc..76e8a5b2588 100644 --- a/homeassistant/components/honeywell/sensor.py +++ b/homeassistant/components/honeywell/sensor.py @@ -1,4 +1,5 @@ """Support for Honeywell (US) Total Connect Comfort sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/horizon/media_player.py b/homeassistant/components/horizon/media_player.py index d91fe7019d6..c03bcc73f41 100644 --- a/homeassistant/components/horizon/media_player.py +++ b/homeassistant/components/horizon/media_player.py @@ -1,4 +1,5 @@ """Support for the Unitymedia Horizon HD Recorder.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/hp_ilo/sensor.py b/homeassistant/components/hp_ilo/sensor.py index fcb8788c646..8d29b20381d 100644 --- a/homeassistant/components/hp_ilo/sensor.py +++ b/homeassistant/components/hp_ilo/sensor.py @@ -1,4 +1,5 @@ """Support for information from HP iLO sensors.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/html5/notify.py b/homeassistant/components/html5/notify.py index a9ecabb37a8..782340dffa6 100644 --- a/homeassistant/components/html5/notify.py +++ b/homeassistant/components/html5/notify.py @@ -1,4 +1,5 @@ """HTML5 Push Messaging notification service.""" + from __future__ import annotations from contextlib import suppress diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index 51c98b080f0..b01d80c9997 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -1,4 +1,5 @@ """Support to serve the Home Assistant API as WSGI application.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/http/auth.py b/homeassistant/components/http/auth.py index 640d899924e..2073c998384 100644 --- a/homeassistant/components/http/auth.py +++ b/homeassistant/components/http/auth.py @@ -1,4 +1,5 @@ """Authentication for HTTP component.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/http/ban.py b/homeassistant/components/http/ban.py index e5a65c2fe72..5a0f40cdeab 100644 --- a/homeassistant/components/http/ban.py +++ b/homeassistant/components/http/ban.py @@ -1,4 +1,5 @@ """Ban logic for HTTP component.""" + from __future__ import annotations from collections import defaultdict diff --git a/homeassistant/components/http/const.py b/homeassistant/components/http/const.py index 3181b043b88..1254744f258 100644 --- a/homeassistant/components/http/const.py +++ b/homeassistant/components/http/const.py @@ -1,4 +1,5 @@ """HTTP specific constants.""" + from typing import Final from homeassistant.helpers.http import KEY_AUTHENTICATED, KEY_HASS # noqa: F401 diff --git a/homeassistant/components/http/cors.py b/homeassistant/components/http/cors.py index 1bb5d2b5a6b..ebae2480589 100644 --- a/homeassistant/components/http/cors.py +++ b/homeassistant/components/http/cors.py @@ -1,4 +1,5 @@ """Provide CORS support for the HTTP component.""" + from __future__ import annotations from typing import Final, cast diff --git a/homeassistant/components/http/data_validator.py b/homeassistant/components/http/data_validator.py index 2868bee9432..749c4f63a2f 100644 --- a/homeassistant/components/http/data_validator.py +++ b/homeassistant/components/http/data_validator.py @@ -1,4 +1,5 @@ """Decorator for view methods to help with data validation.""" + from __future__ import annotations from collections.abc import Awaitable, Callable, Coroutine diff --git a/homeassistant/components/http/decorators.py b/homeassistant/components/http/decorators.py index b2e8e535fd2..bffb42d5817 100644 --- a/homeassistant/components/http/decorators.py +++ b/homeassistant/components/http/decorators.py @@ -1,4 +1,5 @@ """Decorators for the Home Assistant API.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/http/forwarded.py b/homeassistant/components/http/forwarded.py index c5698ebe919..134a31d1625 100644 --- a/homeassistant/components/http/forwarded.py +++ b/homeassistant/components/http/forwarded.py @@ -1,4 +1,5 @@ """Middleware to handle forwarded data by a reverse proxy.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/http/headers.py b/homeassistant/components/http/headers.py index 20c0a58967b..bd05401ebce 100644 --- a/homeassistant/components/http/headers.py +++ b/homeassistant/components/http/headers.py @@ -1,4 +1,5 @@ """Middleware that helps with the control of headers in our responses.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/http/request_context.py b/homeassistant/components/http/request_context.py index b516b63dc5c..c5fcdfb18f3 100644 --- a/homeassistant/components/http/request_context.py +++ b/homeassistant/components/http/request_context.py @@ -1,4 +1,5 @@ """Middleware to set the request context.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/http/security_filter.py b/homeassistant/components/http/security_filter.py index 4d71334f1cf..524d125b857 100644 --- a/homeassistant/components/http/security_filter.py +++ b/homeassistant/components/http/security_filter.py @@ -1,4 +1,5 @@ """Middleware to add some basic security filtering to requests.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/http/static.py b/homeassistant/components/http/static.py index 57f3f22866e..bdc7b08ee4a 100644 --- a/homeassistant/components/http/static.py +++ b/homeassistant/components/http/static.py @@ -1,4 +1,5 @@ """Static file handling for HTTP component.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/http/view.py b/homeassistant/components/http/view.py index ce02879dbb3..712b4e9894f 100644 --- a/homeassistant/components/http/view.py +++ b/homeassistant/components/http/view.py @@ -1,4 +1,5 @@ """Support for views.""" + from __future__ import annotations from homeassistant.helpers.http import ( # noqa: F401 diff --git a/homeassistant/components/http/web_runner.py b/homeassistant/components/http/web_runner.py index 5c0931b97ca..fcdfbc661a7 100644 --- a/homeassistant/components/http/web_runner.py +++ b/homeassistant/components/http/web_runner.py @@ -1,4 +1,5 @@ """HomeAssistant specific aiohttp Site.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/huawei_lte/__init__.py b/homeassistant/components/huawei_lte/__init__.py index 81be4e462d1..7d28d6c187f 100644 --- a/homeassistant/components/huawei_lte/__init__.py +++ b/homeassistant/components/huawei_lte/__init__.py @@ -1,4 +1,5 @@ """Support for Huawei LTE routers.""" + from __future__ import annotations from collections import defaultdict diff --git a/homeassistant/components/huawei_lte/binary_sensor.py b/homeassistant/components/huawei_lte/binary_sensor.py index d4fa0b6db6f..c90a7854a91 100644 --- a/homeassistant/components/huawei_lte/binary_sensor.py +++ b/homeassistant/components/huawei_lte/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Huawei LTE binary sensors.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/huawei_lte/config_flow.py b/homeassistant/components/huawei_lte/config_flow.py index 9138a709c62..84cf88786a9 100644 --- a/homeassistant/components/huawei_lte/config_flow.py +++ b/homeassistant/components/huawei_lte/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the Huawei LTE platform.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/huawei_lte/device_tracker.py b/homeassistant/components/huawei_lte/device_tracker.py index 1bb5077a2b4..1f9905f4e9c 100644 --- a/homeassistant/components/huawei_lte/device_tracker.py +++ b/homeassistant/components/huawei_lte/device_tracker.py @@ -1,4 +1,5 @@ """Support for device tracking of Huawei LTE routers.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/huawei_lte/notify.py b/homeassistant/components/huawei_lte/notify.py index 3b72e2216a6..fc154de3811 100644 --- a/homeassistant/components/huawei_lte/notify.py +++ b/homeassistant/components/huawei_lte/notify.py @@ -1,4 +1,5 @@ """Support for Huawei LTE router notifications.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/huawei_lte/select.py b/homeassistant/components/huawei_lte/select.py index 6fef2d745cb..f4ff0a93d98 100644 --- a/homeassistant/components/huawei_lte/select.py +++ b/homeassistant/components/huawei_lte/select.py @@ -1,4 +1,5 @@ """Support for Huawei LTE selects.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/huawei_lte/sensor.py b/homeassistant/components/huawei_lte/sensor.py index d7fb5565969..a52aff5fd68 100644 --- a/homeassistant/components/huawei_lte/sensor.py +++ b/homeassistant/components/huawei_lte/sensor.py @@ -1,4 +1,5 @@ """Support for Huawei LTE sensors.""" + from __future__ import annotations from bisect import bisect diff --git a/homeassistant/components/huawei_lte/switch.py b/homeassistant/components/huawei_lte/switch.py index 3743716390e..3a499851f9a 100644 --- a/homeassistant/components/huawei_lte/switch.py +++ b/homeassistant/components/huawei_lte/switch.py @@ -1,4 +1,5 @@ """Support for Huawei LTE switches.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/huawei_lte/utils.py b/homeassistant/components/huawei_lte/utils.py index df212a1c25d..2225fb13ffc 100644 --- a/homeassistant/components/huawei_lte/utils.py +++ b/homeassistant/components/huawei_lte/utils.py @@ -1,4 +1,5 @@ """Utilities for the Huawei LTE integration.""" + from __future__ import annotations from contextlib import suppress diff --git a/homeassistant/components/hue/__init__.py b/homeassistant/components/hue/__init__.py index 21e9bfab6be..d4c2959771b 100644 --- a/homeassistant/components/hue/__init__.py +++ b/homeassistant/components/hue/__init__.py @@ -1,4 +1,5 @@ """Support for the Philips Hue system.""" + from aiohue.util import normalize_bridge_id from homeassistant.components import persistent_notification diff --git a/homeassistant/components/hue/binary_sensor.py b/homeassistant/components/hue/binary_sensor.py index b66b85a4844..2cb8e8b5d90 100644 --- a/homeassistant/components/hue/binary_sensor.py +++ b/homeassistant/components/hue/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Hue binary sensors.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/hue/bridge.py b/homeassistant/components/hue/bridge.py index 86db9c4021c..f167897d77b 100644 --- a/homeassistant/components/hue/bridge.py +++ b/homeassistant/components/hue/bridge.py @@ -1,4 +1,5 @@ """Code to handle a Hue bridge.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hue/config_flow.py b/homeassistant/components/hue/config_flow.py index b7624f2c0f0..9014f2644f5 100644 --- a/homeassistant/components/hue/config_flow.py +++ b/homeassistant/components/hue/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure Philips Hue.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hue/const.py b/homeassistant/components/hue/const.py index 5033aaa427a..62700478b53 100644 --- a/homeassistant/components/hue/const.py +++ b/homeassistant/components/hue/const.py @@ -1,4 +1,5 @@ """Constants for the Hue component.""" + from aiohue.v2.models.button import ButtonEvent from aiohue.v2.models.relative_rotary import ( RelativeRotaryAction, diff --git a/homeassistant/components/hue/device_trigger.py b/homeassistant/components/hue/device_trigger.py index 069f0d42d8d..4104c667d74 100644 --- a/homeassistant/components/hue/device_trigger.py +++ b/homeassistant/components/hue/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for Philips Hue events.""" + from __future__ import annotations from typing import TYPE_CHECKING, Any diff --git a/homeassistant/components/hue/diagnostics.py b/homeassistant/components/hue/diagnostics.py index 17f00a50bbe..6bb23d832cd 100644 --- a/homeassistant/components/hue/diagnostics.py +++ b/homeassistant/components/hue/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Hue.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hue/errors.py b/homeassistant/components/hue/errors.py index dd217c3bc26..670d1282c96 100644 --- a/homeassistant/components/hue/errors.py +++ b/homeassistant/components/hue/errors.py @@ -1,4 +1,5 @@ """Errors for the Hue component.""" + from homeassistant.exceptions import HomeAssistantError diff --git a/homeassistant/components/hue/event.py b/homeassistant/components/hue/event.py index 183d2bfb3ae..c12468c0f36 100644 --- a/homeassistant/components/hue/event.py +++ b/homeassistant/components/hue/event.py @@ -1,4 +1,5 @@ """Hue event entities from Button resources.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hue/light.py b/homeassistant/components/hue/light.py index 2bd9652f9b0..c3168b5c8c1 100644 --- a/homeassistant/components/hue/light.py +++ b/homeassistant/components/hue/light.py @@ -1,4 +1,5 @@ """Support for Hue lights.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/hue/scene.py b/homeassistant/components/hue/scene.py index 17f7a81b2a5..67148eb8be8 100644 --- a/homeassistant/components/hue/scene.py +++ b/homeassistant/components/hue/scene.py @@ -1,4 +1,5 @@ """Support for scene platform for Hue scenes (V2 only).""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hue/sensor.py b/homeassistant/components/hue/sensor.py index 7218831abe2..45cff053aef 100644 --- a/homeassistant/components/hue/sensor.py +++ b/homeassistant/components/hue/sensor.py @@ -1,4 +1,5 @@ """Support for Hue sensors.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/hue/services.py b/homeassistant/components/hue/services.py index 5b0b252e8d4..30555339f19 100644 --- a/homeassistant/components/hue/services.py +++ b/homeassistant/components/hue/services.py @@ -1,4 +1,5 @@ """Handle Hue Service calls.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hue/switch.py b/homeassistant/components/hue/switch.py index c9da30a779c..022a12f6ffc 100644 --- a/homeassistant/components/hue/switch.py +++ b/homeassistant/components/hue/switch.py @@ -1,4 +1,5 @@ """Support for switch platform for Hue resources (V2 only).""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hue/v1/binary_sensor.py b/homeassistant/components/hue/v1/binary_sensor.py index 78cedc4437f..01524b48b79 100644 --- a/homeassistant/components/hue/v1/binary_sensor.py +++ b/homeassistant/components/hue/v1/binary_sensor.py @@ -1,4 +1,5 @@ """Hue binary sensor entities.""" + from aiohue.v1.sensors import TYPE_ZLL_PRESENCE from homeassistant.components.binary_sensor import ( diff --git a/homeassistant/components/hue/v1/device_trigger.py b/homeassistant/components/hue/v1/device_trigger.py index 930c85c0414..554926cdc70 100644 --- a/homeassistant/components/hue/v1/device_trigger.py +++ b/homeassistant/components/hue/v1/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for Philips Hue events in V1 bridge/api.""" + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/homeassistant/components/hue/v1/light.py b/homeassistant/components/hue/v1/light.py index 18440f68239..68e05932e7a 100644 --- a/homeassistant/components/hue/v1/light.py +++ b/homeassistant/components/hue/v1/light.py @@ -1,4 +1,5 @@ """Support for the Philips Hue lights.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hue/v1/sensor.py b/homeassistant/components/hue/v1/sensor.py index 20ea4330e30..9a85f83f3e8 100644 --- a/homeassistant/components/hue/v1/sensor.py +++ b/homeassistant/components/hue/v1/sensor.py @@ -1,4 +1,5 @@ """Hue sensor entities.""" + from aiohue.v1.sensors import ( TYPE_ZLL_LIGHTLEVEL, TYPE_ZLL_ROTARY, diff --git a/homeassistant/components/hue/v1/sensor_base.py b/homeassistant/components/hue/v1/sensor_base.py index 723ecfff451..bac02c45209 100644 --- a/homeassistant/components/hue/v1/sensor_base.py +++ b/homeassistant/components/hue/v1/sensor_base.py @@ -1,4 +1,5 @@ """Support for the Philips Hue sensors as a platform.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hue/v1/sensor_device.py b/homeassistant/components/hue/v1/sensor_device.py index 9ffc1518cba..1ff97af2e62 100644 --- a/homeassistant/components/hue/v1/sensor_device.py +++ b/homeassistant/components/hue/v1/sensor_device.py @@ -1,4 +1,5 @@ """Support for the Philips Hue sensor devices.""" + from homeassistant.helpers import entity from homeassistant.helpers.device_registry import DeviceInfo diff --git a/homeassistant/components/hue/v2/binary_sensor.py b/homeassistant/components/hue/v2/binary_sensor.py index 4707302d288..bc650569a63 100644 --- a/homeassistant/components/hue/v2/binary_sensor.py +++ b/homeassistant/components/hue/v2/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Hue binary sensors.""" + from __future__ import annotations from functools import partial diff --git a/homeassistant/components/hue/v2/device.py b/homeassistant/components/hue/v2/device.py index 75f474cc0ea..38c5724d4a8 100644 --- a/homeassistant/components/hue/v2/device.py +++ b/homeassistant/components/hue/v2/device.py @@ -1,4 +1,5 @@ """Handles Hue resource of type `device` mapping to Home Assistant device.""" + from typing import TYPE_CHECKING from aiohue.v2 import HueBridgeV2 diff --git a/homeassistant/components/hue/v2/device_trigger.py b/homeassistant/components/hue/v2/device_trigger.py index a3027736661..eca7908e930 100644 --- a/homeassistant/components/hue/v2/device_trigger.py +++ b/homeassistant/components/hue/v2/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for Philips Hue events.""" + from __future__ import annotations from typing import TYPE_CHECKING, Any diff --git a/homeassistant/components/hue/v2/entity.py b/homeassistant/components/hue/v2/entity.py index 75e4bb1edd4..8aeac4d8180 100644 --- a/homeassistant/components/hue/v2/entity.py +++ b/homeassistant/components/hue/v2/entity.py @@ -1,4 +1,5 @@ """Generic Hue Entity Model.""" + from __future__ import annotations from typing import TYPE_CHECKING, TypeAlias diff --git a/homeassistant/components/hue/v2/group.py b/homeassistant/components/hue/v2/group.py index 8ce6d287551..32ac29b71f2 100644 --- a/homeassistant/components/hue/v2/group.py +++ b/homeassistant/components/hue/v2/group.py @@ -1,4 +1,5 @@ """Support for Hue groups (room/zone).""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hue/v2/helpers.py b/homeassistant/components/hue/v2/helpers.py index 97fdbe6160a..480296760e7 100644 --- a/homeassistant/components/hue/v2/helpers.py +++ b/homeassistant/components/hue/v2/helpers.py @@ -1,4 +1,5 @@ """Helper functions for Philips Hue v2.""" + from __future__ import annotations diff --git a/homeassistant/components/hue/v2/light.py b/homeassistant/components/hue/v2/light.py index bbf5dc9c19f..9fb883d1930 100644 --- a/homeassistant/components/hue/v2/light.py +++ b/homeassistant/components/hue/v2/light.py @@ -1,4 +1,5 @@ """Support for Hue lights.""" + from __future__ import annotations from functools import partial diff --git a/homeassistant/components/hue/v2/sensor.py b/homeassistant/components/hue/v2/sensor.py index 59dc8de2975..e46ca561964 100644 --- a/homeassistant/components/hue/v2/sensor.py +++ b/homeassistant/components/hue/v2/sensor.py @@ -1,4 +1,5 @@ """Support for Hue sensors.""" + from __future__ import annotations from functools import partial diff --git a/homeassistant/components/huisbaasje/const.py b/homeassistant/components/huisbaasje/const.py index f9084831263..108e3fffa1e 100644 --- a/homeassistant/components/huisbaasje/const.py +++ b/homeassistant/components/huisbaasje/const.py @@ -1,4 +1,5 @@ """Constants for the Huisbaasje integration.""" + from energyflip.const import ( SOURCE_TYPE_ELECTRICITY, SOURCE_TYPE_ELECTRICITY_IN, diff --git a/homeassistant/components/huisbaasje/sensor.py b/homeassistant/components/huisbaasje/sensor.py index f07711268d5..d09b559516b 100644 --- a/homeassistant/components/huisbaasje/sensor.py +++ b/homeassistant/components/huisbaasje/sensor.py @@ -1,4 +1,5 @@ """Platform for sensor integration.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/humidifier/__init__.py b/homeassistant/components/humidifier/__init__.py index 37f9d49f0dd..97f78aba21c 100644 --- a/homeassistant/components/humidifier/__init__.py +++ b/homeassistant/components/humidifier/__init__.py @@ -1,4 +1,5 @@ """Provides functionality to interact with humidifier devices.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/humidifier/const.py b/homeassistant/components/humidifier/const.py index 66ac0fcf18d..fc6b0fc14d4 100644 --- a/homeassistant/components/humidifier/const.py +++ b/homeassistant/components/humidifier/const.py @@ -1,4 +1,5 @@ """Provides the constants needed for component.""" + from enum import IntFlag, StrEnum from functools import partial diff --git a/homeassistant/components/humidifier/device_action.py b/homeassistant/components/humidifier/device_action.py index f1f25101e93..74ef73443d6 100644 --- a/homeassistant/components/humidifier/device_action.py +++ b/homeassistant/components/humidifier/device_action.py @@ -1,4 +1,5 @@ """Provides device actions for Humidifier.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/humidifier/device_condition.py b/homeassistant/components/humidifier/device_condition.py index c2c0378a746..7ea9899bba7 100644 --- a/homeassistant/components/humidifier/device_condition.py +++ b/homeassistant/components/humidifier/device_condition.py @@ -1,4 +1,5 @@ """Provide the device automations for Humidifier.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/humidifier/device_trigger.py b/homeassistant/components/humidifier/device_trigger.py index 0d689a35318..757b0d9a078 100644 --- a/homeassistant/components/humidifier/device_trigger.py +++ b/homeassistant/components/humidifier/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for Climate.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/humidifier/intent.py b/homeassistant/components/humidifier/intent.py index 103521aeb04..361de8e36db 100644 --- a/homeassistant/components/humidifier/intent.py +++ b/homeassistant/components/humidifier/intent.py @@ -1,4 +1,5 @@ """Intents for the humidifier integration.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/humidifier/reproduce_state.py b/homeassistant/components/humidifier/reproduce_state.py index be4f1afbeb9..7caff04acdb 100644 --- a/homeassistant/components/humidifier/reproduce_state.py +++ b/homeassistant/components/humidifier/reproduce_state.py @@ -1,4 +1,5 @@ """Module that groups code required to handle state restore for component.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/humidifier/significant_change.py b/homeassistant/components/humidifier/significant_change.py index cc279a9fa41..dcf89f2eba9 100644 --- a/homeassistant/components/humidifier/significant_change.py +++ b/homeassistant/components/humidifier/significant_change.py @@ -1,4 +1,5 @@ """Helper to test significant Humidifier state changes.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/hunterdouglas_powerview/button.py b/homeassistant/components/hunterdouglas_powerview/button.py index c37741fcb09..1ce30e8df81 100644 --- a/homeassistant/components/hunterdouglas_powerview/button.py +++ b/homeassistant/components/hunterdouglas_powerview/button.py @@ -1,4 +1,5 @@ """Buttons for Hunter Douglas Powerview advanced features.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/hunterdouglas_powerview/config_flow.py b/homeassistant/components/hunterdouglas_powerview/config_flow.py index cee5d65fd0a..2b511144380 100644 --- a/homeassistant/components/hunterdouglas_powerview/config_flow.py +++ b/homeassistant/components/hunterdouglas_powerview/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Hunter Douglas PowerView integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hunterdouglas_powerview/coordinator.py b/homeassistant/components/hunterdouglas_powerview/coordinator.py index db4079f2b58..2ffb463dc92 100644 --- a/homeassistant/components/hunterdouglas_powerview/coordinator.py +++ b/homeassistant/components/hunterdouglas_powerview/coordinator.py @@ -1,4 +1,5 @@ """Coordinate data for powerview devices.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hunterdouglas_powerview/cover.py b/homeassistant/components/hunterdouglas_powerview/cover.py index 5b998b697a4..a3919aefd7c 100644 --- a/homeassistant/components/hunterdouglas_powerview/cover.py +++ b/homeassistant/components/hunterdouglas_powerview/cover.py @@ -1,4 +1,5 @@ """Support for hunter douglas shades.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hunterdouglas_powerview/diagnostics.py b/homeassistant/components/hunterdouglas_powerview/diagnostics.py index 12f424ea501..1fbf721d2bd 100644 --- a/homeassistant/components/hunterdouglas_powerview/diagnostics.py +++ b/homeassistant/components/hunterdouglas_powerview/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Powerview Hunter Douglas.""" + from __future__ import annotations from dataclasses import asdict diff --git a/homeassistant/components/hunterdouglas_powerview/model.py b/homeassistant/components/hunterdouglas_powerview/model.py index e2311eb4e4c..7cf259ced18 100644 --- a/homeassistant/components/hunterdouglas_powerview/model.py +++ b/homeassistant/components/hunterdouglas_powerview/model.py @@ -1,4 +1,5 @@ """Define Hunter Douglas data models.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/hunterdouglas_powerview/scene.py b/homeassistant/components/hunterdouglas_powerview/scene.py index 0ba9b13d03b..af5b86960c4 100644 --- a/homeassistant/components/hunterdouglas_powerview/scene.py +++ b/homeassistant/components/hunterdouglas_powerview/scene.py @@ -1,4 +1,5 @@ """Support for Powerview scenes from a Powerview hub.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/hunterdouglas_powerview/select.py b/homeassistant/components/hunterdouglas_powerview/select.py index bbe4614afd1..c902c2b1a58 100644 --- a/homeassistant/components/hunterdouglas_powerview/select.py +++ b/homeassistant/components/hunterdouglas_powerview/select.py @@ -1,4 +1,5 @@ """Support for hunterdouglass_powerview settings.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/hunterdouglas_powerview/shade_data.py b/homeassistant/components/hunterdouglas_powerview/shade_data.py index 86f232c3b66..4d780b83ecb 100644 --- a/homeassistant/components/hunterdouglas_powerview/shade_data.py +++ b/homeassistant/components/hunterdouglas_powerview/shade_data.py @@ -1,4 +1,5 @@ """Shade data for the Hunter Douglas PowerView integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/hunterdouglas_powerview/util.py b/homeassistant/components/hunterdouglas_powerview/util.py index 15330f30bdb..1d670f46429 100644 --- a/homeassistant/components/hunterdouglas_powerview/util.py +++ b/homeassistant/components/hunterdouglas_powerview/util.py @@ -1,4 +1,5 @@ """Coordinate data for powerview devices.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/husqvarna_automower/config_flow.py b/homeassistant/components/husqvarna_automower/config_flow.py index 5ba0aeae154..88b4899ff12 100644 --- a/homeassistant/components/husqvarna_automower/config_flow.py +++ b/homeassistant/components/husqvarna_automower/config_flow.py @@ -1,4 +1,5 @@ """Config flow to add the integration via the UI.""" + from collections.abc import Mapping import logging from typing import Any diff --git a/homeassistant/components/husqvarna_automower/sensor.py b/homeassistant/components/husqvarna_automower/sensor.py index 970c444737c..5358ad6e4cf 100644 --- a/homeassistant/components/husqvarna_automower/sensor.py +++ b/homeassistant/components/husqvarna_automower/sensor.py @@ -1,4 +1,5 @@ """Creates a the sensor entities for the mower.""" + from collections.abc import Callable from dataclasses import dataclass import datetime diff --git a/homeassistant/components/huum/__init__.py b/homeassistant/components/huum/__init__.py index a5daf471a2d..75faf1923df 100644 --- a/homeassistant/components/huum/__init__.py +++ b/homeassistant/components/huum/__init__.py @@ -1,4 +1,5 @@ """The Huum integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/huum/climate.py b/homeassistant/components/huum/climate.py index 2bc3c626deb..df740aea3d1 100644 --- a/homeassistant/components/huum/climate.py +++ b/homeassistant/components/huum/climate.py @@ -1,4 +1,5 @@ """Support for Huum wifi-enabled sauna.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/huum/config_flow.py b/homeassistant/components/huum/config_flow.py index 76a9f3563bb..e2ea2a7dbe1 100644 --- a/homeassistant/components/huum/config_flow.py +++ b/homeassistant/components/huum/config_flow.py @@ -1,4 +1,5 @@ """Config flow for huum integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/hvv_departures/binary_sensor.py b/homeassistant/components/hvv_departures/binary_sensor.py index 8337921acf6..913c61f91b4 100644 --- a/homeassistant/components/hvv_departures/binary_sensor.py +++ b/homeassistant/components/hvv_departures/binary_sensor.py @@ -1,4 +1,5 @@ """Binary sensor platform for hvv_departures.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hvv_departures/config_flow.py b/homeassistant/components/hvv_departures/config_flow.py index e0ab65ba1c4..0c909e2d8c1 100644 --- a/homeassistant/components/hvv_departures/config_flow.py +++ b/homeassistant/components/hvv_departures/config_flow.py @@ -1,4 +1,5 @@ """Config flow for HVV integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/hvv_departures/sensor.py b/homeassistant/components/hvv_departures/sensor.py index 2267522e21b..5998a3dd826 100644 --- a/homeassistant/components/hvv_departures/sensor.py +++ b/homeassistant/components/hvv_departures/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for hvv.""" + from datetime import timedelta import logging from typing import Any diff --git a/homeassistant/components/hydrawise/binary_sensor.py b/homeassistant/components/hydrawise/binary_sensor.py index 0b12fcb3ddb..7740334e7fb 100644 --- a/homeassistant/components/hydrawise/binary_sensor.py +++ b/homeassistant/components/hydrawise/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Hydrawise sprinkler binary sensors.""" + from __future__ import annotations from pydrawise.schema import Zone diff --git a/homeassistant/components/hydrawise/entity.py b/homeassistant/components/hydrawise/entity.py index 887de6ba648..2ae893887e6 100644 --- a/homeassistant/components/hydrawise/entity.py +++ b/homeassistant/components/hydrawise/entity.py @@ -1,4 +1,5 @@ """Base classes for Hydrawise entities.""" + from __future__ import annotations from pydrawise.schema import Controller, Zone diff --git a/homeassistant/components/hydrawise/sensor.py b/homeassistant/components/hydrawise/sensor.py index 9e3445b2c5d..eedeb4a07bc 100644 --- a/homeassistant/components/hydrawise/sensor.py +++ b/homeassistant/components/hydrawise/sensor.py @@ -1,4 +1,5 @@ """Support for Hydrawise sprinkler sensors.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/hydrawise/switch.py b/homeassistant/components/hydrawise/switch.py index 8a92a56975a..49106a5938a 100644 --- a/homeassistant/components/hydrawise/switch.py +++ b/homeassistant/components/hydrawise/switch.py @@ -1,4 +1,5 @@ """Support for Hydrawise cloud switches.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/hyperion/__init__.py b/homeassistant/components/hyperion/__init__.py index 58eaedb3ff9..94137b5dd3f 100644 --- a/homeassistant/components/hyperion/__init__.py +++ b/homeassistant/components/hyperion/__init__.py @@ -1,4 +1,5 @@ """The Hyperion component.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hyperion/config_flow.py b/homeassistant/components/hyperion/config_flow.py index 3770402dbf0..e29caa27ef7 100644 --- a/homeassistant/components/hyperion/config_flow.py +++ b/homeassistant/components/hyperion/config_flow.py @@ -1,4 +1,5 @@ """Hyperion config flow.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/hyperion/light.py b/homeassistant/components/hyperion/light.py index 824d83591ef..5fa129ce7ad 100644 --- a/homeassistant/components/hyperion/light.py +++ b/homeassistant/components/hyperion/light.py @@ -1,4 +1,5 @@ """Support for Hyperion-NG remotes.""" + from __future__ import annotations from collections.abc import Callable, Mapping, Sequence diff --git a/homeassistant/components/hyperion/sensor.py b/homeassistant/components/hyperion/sensor.py index f0d1c6b1314..f537c282686 100644 --- a/homeassistant/components/hyperion/sensor.py +++ b/homeassistant/components/hyperion/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for Hyperion.""" + from __future__ import annotations import functools diff --git a/homeassistant/components/hyperion/switch.py b/homeassistant/components/hyperion/switch.py index eb7b260a370..dbe0bbb5c70 100644 --- a/homeassistant/components/hyperion/switch.py +++ b/homeassistant/components/hyperion/switch.py @@ -1,4 +1,5 @@ """Switch platform for Hyperion.""" + from __future__ import annotations import functools diff --git a/homeassistant/components/ialarm/__init__.py b/homeassistant/components/ialarm/__init__.py index ff54c02a2d4..6ebd219f6ec 100644 --- a/homeassistant/components/ialarm/__init__.py +++ b/homeassistant/components/ialarm/__init__.py @@ -1,4 +1,5 @@ """iAlarm integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/ialarm/alarm_control_panel.py b/homeassistant/components/ialarm/alarm_control_panel.py index b09e31f5312..44e676fc32e 100644 --- a/homeassistant/components/ialarm/alarm_control_panel.py +++ b/homeassistant/components/ialarm/alarm_control_panel.py @@ -1,4 +1,5 @@ """Interfaces with iAlarm control panels.""" + from __future__ import annotations from homeassistant.components.alarm_control_panel import ( diff --git a/homeassistant/components/ialarm/const.py b/homeassistant/components/ialarm/const.py index c6eaf0ec979..d1561cc86d5 100644 --- a/homeassistant/components/ialarm/const.py +++ b/homeassistant/components/ialarm/const.py @@ -1,4 +1,5 @@ """Constants for the iAlarm integration.""" + from pyialarm import IAlarm from homeassistant.const import ( diff --git a/homeassistant/components/iammeter/const.py b/homeassistant/components/iammeter/const.py index c2d122c9e32..0336007ef3e 100644 --- a/homeassistant/components/iammeter/const.py +++ b/homeassistant/components/iammeter/const.py @@ -1,4 +1,5 @@ """Constants for the Iammeter integration.""" + from __future__ import annotations DOMAIN = "iammeter" diff --git a/homeassistant/components/iammeter/sensor.py b/homeassistant/components/iammeter/sensor.py index 3537737f122..2a5d3ed7a81 100644 --- a/homeassistant/components/iammeter/sensor.py +++ b/homeassistant/components/iammeter/sensor.py @@ -1,4 +1,5 @@ """Support for iammeter via local API.""" + from __future__ import annotations from asyncio import timeout diff --git a/homeassistant/components/iaqualink/__init__.py b/homeassistant/components/iaqualink/__init__.py index 49eaa2b24a5..6468347b001 100644 --- a/homeassistant/components/iaqualink/__init__.py +++ b/homeassistant/components/iaqualink/__init__.py @@ -1,4 +1,5 @@ """Component to embed Aqualink devices.""" + from __future__ import annotations from collections.abc import Awaitable, Callable, Coroutine diff --git a/homeassistant/components/iaqualink/binary_sensor.py b/homeassistant/components/iaqualink/binary_sensor.py index 149261f97fc..defacb26e29 100644 --- a/homeassistant/components/iaqualink/binary_sensor.py +++ b/homeassistant/components/iaqualink/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Aqualink temperature sensors.""" + from __future__ import annotations from iaqualink.device import AqualinkBinarySensor diff --git a/homeassistant/components/iaqualink/climate.py b/homeassistant/components/iaqualink/climate.py index 5a81ad3d681..77981c98aa4 100644 --- a/homeassistant/components/iaqualink/climate.py +++ b/homeassistant/components/iaqualink/climate.py @@ -1,4 +1,5 @@ """Support for Aqualink Thermostats.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/iaqualink/config_flow.py b/homeassistant/components/iaqualink/config_flow.py index abacdf7a42f..3605c328903 100644 --- a/homeassistant/components/iaqualink/config_flow.py +++ b/homeassistant/components/iaqualink/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure zone component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/iaqualink/const.py b/homeassistant/components/iaqualink/const.py index ef939e3fc52..1db4b5a6f16 100644 --- a/homeassistant/components/iaqualink/const.py +++ b/homeassistant/components/iaqualink/const.py @@ -1,4 +1,5 @@ """Constants for the iaqualink component.""" + from datetime import timedelta DOMAIN = "iaqualink" diff --git a/homeassistant/components/iaqualink/light.py b/homeassistant/components/iaqualink/light.py index 3a166ba593d..d5e37b9bac6 100644 --- a/homeassistant/components/iaqualink/light.py +++ b/homeassistant/components/iaqualink/light.py @@ -1,4 +1,5 @@ """Support for Aqualink pool lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/iaqualink/sensor.py b/homeassistant/components/iaqualink/sensor.py index 15e8fc5836d..9859e535c60 100644 --- a/homeassistant/components/iaqualink/sensor.py +++ b/homeassistant/components/iaqualink/sensor.py @@ -1,4 +1,5 @@ """Support for Aqualink temperature sensors.""" + from __future__ import annotations from iaqualink.device import AqualinkSensor diff --git a/homeassistant/components/iaqualink/switch.py b/homeassistant/components/iaqualink/switch.py index 590fcd61419..65d1c81d7fe 100644 --- a/homeassistant/components/iaqualink/switch.py +++ b/homeassistant/components/iaqualink/switch.py @@ -1,4 +1,5 @@ """Support for Aqualink pool feature switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/iaqualink/utils.py b/homeassistant/components/iaqualink/utils.py index 87bc863a7f8..62d2d4d2e93 100644 --- a/homeassistant/components/iaqualink/utils.py +++ b/homeassistant/components/iaqualink/utils.py @@ -1,4 +1,5 @@ """Utility functions for Aqualink devices.""" + from __future__ import annotations from collections.abc import Awaitable diff --git a/homeassistant/components/ibeacon/__init__.py b/homeassistant/components/ibeacon/__init__.py index 02a19ef6332..0e89ee3bbcd 100644 --- a/homeassistant/components/ibeacon/__init__.py +++ b/homeassistant/components/ibeacon/__init__.py @@ -1,4 +1,5 @@ """The iBeacon tracker integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/ibeacon/config_flow.py b/homeassistant/components/ibeacon/config_flow.py index c315090ef3d..ccedaa675b6 100644 --- a/homeassistant/components/ibeacon/config_flow.py +++ b/homeassistant/components/ibeacon/config_flow.py @@ -1,4 +1,5 @@ """Config flow for iBeacon Tracker integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/ibeacon/coordinator.py b/homeassistant/components/ibeacon/coordinator.py index b23ea77e013..27181e80ed8 100644 --- a/homeassistant/components/ibeacon/coordinator.py +++ b/homeassistant/components/ibeacon/coordinator.py @@ -1,4 +1,5 @@ """Tracking for iBeacon devices.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/ibeacon/device_tracker.py b/homeassistant/components/ibeacon/device_tracker.py index 80d5733eccf..8d24d7f0aa9 100644 --- a/homeassistant/components/ibeacon/device_tracker.py +++ b/homeassistant/components/ibeacon/device_tracker.py @@ -1,4 +1,5 @@ """Support for tracking iBeacon devices.""" + from __future__ import annotations from ibeacon_ble import iBeaconAdvertisement diff --git a/homeassistant/components/ibeacon/entity.py b/homeassistant/components/ibeacon/entity.py index b25c82037e1..d4f969ff94a 100644 --- a/homeassistant/components/ibeacon/entity.py +++ b/homeassistant/components/ibeacon/entity.py @@ -1,4 +1,5 @@ """Support for iBeacon device sensors.""" + from __future__ import annotations from abc import abstractmethod diff --git a/homeassistant/components/ibeacon/sensor.py b/homeassistant/components/ibeacon/sensor.py index 500b0de93f6..8ec3ef9b67b 100644 --- a/homeassistant/components/ibeacon/sensor.py +++ b/homeassistant/components/ibeacon/sensor.py @@ -1,4 +1,5 @@ """Support for iBeacon device sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/icloud/__init__.py b/homeassistant/components/icloud/__init__.py index 010de4ec4ba..431a1abd2e1 100644 --- a/homeassistant/components/icloud/__init__.py +++ b/homeassistant/components/icloud/__init__.py @@ -1,4 +1,5 @@ """The iCloud component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/icloud/account.py b/homeassistant/components/icloud/account.py index 257bf536006..cee80535f55 100644 --- a/homeassistant/components/icloud/account.py +++ b/homeassistant/components/icloud/account.py @@ -1,4 +1,5 @@ """iCloud account.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/icloud/config_flow.py b/homeassistant/components/icloud/config_flow.py index 5a46ab3b4f3..caec770743b 100644 --- a/homeassistant/components/icloud/config_flow.py +++ b/homeassistant/components/icloud/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the iCloud integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/icloud/const.py b/homeassistant/components/icloud/const.py index 231f2cc1d0a..b7ea2691ca4 100644 --- a/homeassistant/components/icloud/const.py +++ b/homeassistant/components/icloud/const.py @@ -1,4 +1,5 @@ """iCloud component constants.""" + from homeassistant.const import Platform DOMAIN = "icloud" diff --git a/homeassistant/components/icloud/device_tracker.py b/homeassistant/components/icloud/device_tracker.py index 8513b47be2a..48070a7f153 100644 --- a/homeassistant/components/icloud/device_tracker.py +++ b/homeassistant/components/icloud/device_tracker.py @@ -1,4 +1,5 @@ """Support for tracking for iCloud devices.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/icloud/sensor.py b/homeassistant/components/icloud/sensor.py index 320c3f9f240..53c9765f6cc 100644 --- a/homeassistant/components/icloud/sensor.py +++ b/homeassistant/components/icloud/sensor.py @@ -1,4 +1,5 @@ """Support for iCloud sensors.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/idasen_desk/__init__.py b/homeassistant/components/idasen_desk/__init__.py index c3e5f3de429..75ef70fcb50 100644 --- a/homeassistant/components/idasen_desk/__init__.py +++ b/homeassistant/components/idasen_desk/__init__.py @@ -1,4 +1,5 @@ """The IKEA Idasen Desk integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/idasen_desk/button.py b/homeassistant/components/idasen_desk/button.py index 1887ffe438b..7119d890a64 100644 --- a/homeassistant/components/idasen_desk/button.py +++ b/homeassistant/components/idasen_desk/button.py @@ -1,4 +1,5 @@ """Representation of Idasen Desk buttons.""" + from collections.abc import Callable, Coroutine from dataclasses import dataclass import logging diff --git a/homeassistant/components/idasen_desk/config_flow.py b/homeassistant/components/idasen_desk/config_flow.py index 8fec40cde80..8d6af14f043 100644 --- a/homeassistant/components/idasen_desk/config_flow.py +++ b/homeassistant/components/idasen_desk/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Idasen Desk integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/idasen_desk/cover.py b/homeassistant/components/idasen_desk/cover.py index a29d2557f93..f5591eff0d8 100644 --- a/homeassistant/components/idasen_desk/cover.py +++ b/homeassistant/components/idasen_desk/cover.py @@ -1,4 +1,5 @@ """Idasen Desk integration cover platform.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/idasen_desk/sensor.py b/homeassistant/components/idasen_desk/sensor.py index 44a001960c8..fcbdbc6c25e 100644 --- a/homeassistant/components/idasen_desk/sensor.py +++ b/homeassistant/components/idasen_desk/sensor.py @@ -1,4 +1,5 @@ """Representation of Idasen Desk sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/idteck_prox/__init__.py b/homeassistant/components/idteck_prox/__init__.py index 4de6af70995..7b92499a197 100644 --- a/homeassistant/components/idteck_prox/__init__.py +++ b/homeassistant/components/idteck_prox/__init__.py @@ -1,4 +1,5 @@ """Component for interfacing RFK101 proximity card readers.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/ifttt/__init__.py b/homeassistant/components/ifttt/__init__.py index 736efcb03a7..e3db68e2302 100644 --- a/homeassistant/components/ifttt/__init__.py +++ b/homeassistant/components/ifttt/__init__.py @@ -1,4 +1,5 @@ """Support to trigger Maker IFTTT recipes.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/ifttt/alarm_control_panel.py b/homeassistant/components/ifttt/alarm_control_panel.py index b568693303a..81ed9320bcb 100644 --- a/homeassistant/components/ifttt/alarm_control_panel.py +++ b/homeassistant/components/ifttt/alarm_control_panel.py @@ -1,4 +1,5 @@ """Support for alarm control panels that can be controlled through IFTTT.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/ifttt/config_flow.py b/homeassistant/components/ifttt/config_flow.py index dc28f6bbaa2..8c0de38a7f8 100644 --- a/homeassistant/components/ifttt/config_flow.py +++ b/homeassistant/components/ifttt/config_flow.py @@ -1,4 +1,5 @@ """Config flow for IFTTT.""" + from homeassistant.helpers import config_entry_flow from .const import DOMAIN diff --git a/homeassistant/components/iglo/light.py b/homeassistant/components/iglo/light.py index 5de24625ea3..1cd303b8856 100644 --- a/homeassistant/components/iglo/light.py +++ b/homeassistant/components/iglo/light.py @@ -1,4 +1,5 @@ """Support for lights under the iGlo brand.""" + from __future__ import annotations import math diff --git a/homeassistant/components/ign_sismologia/geo_location.py b/homeassistant/components/ign_sismologia/geo_location.py index 794da41ea12..af7fab5b79b 100644 --- a/homeassistant/components/ign_sismologia/geo_location.py +++ b/homeassistant/components/ign_sismologia/geo_location.py @@ -1,4 +1,5 @@ """Support for IGN Sismologia (Earthquakes) Feeds.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/ihc/binary_sensor.py b/homeassistant/components/ihc/binary_sensor.py index badf0f4e92f..ed273878cb4 100644 --- a/homeassistant/components/ihc/binary_sensor.py +++ b/homeassistant/components/ihc/binary_sensor.py @@ -1,4 +1,5 @@ """Support for IHC binary sensors.""" + from __future__ import annotations from ihcsdk.ihccontroller import IHCController diff --git a/homeassistant/components/ihc/const.py b/homeassistant/components/ihc/const.py index c86e77870c8..8a07bd4fec4 100644 --- a/homeassistant/components/ihc/const.py +++ b/homeassistant/components/ihc/const.py @@ -1,4 +1,5 @@ """IHC component constants.""" + from homeassistant.const import Platform ATTR_IHC_ID = "ihc_id" diff --git a/homeassistant/components/ihc/light.py b/homeassistant/components/ihc/light.py index b469cb54aee..98e373daff4 100644 --- a/homeassistant/components/ihc/light.py +++ b/homeassistant/components/ihc/light.py @@ -1,4 +1,5 @@ """Support for IHC lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/ihc/sensor.py b/homeassistant/components/ihc/sensor.py index c1210a358d6..1ca41ed2666 100644 --- a/homeassistant/components/ihc/sensor.py +++ b/homeassistant/components/ihc/sensor.py @@ -1,4 +1,5 @@ """Support for IHC sensors.""" + from __future__ import annotations from ihcsdk.ihccontroller import IHCController diff --git a/homeassistant/components/ihc/switch.py b/homeassistant/components/ihc/switch.py index d4593dad570..f41f17bc998 100644 --- a/homeassistant/components/ihc/switch.py +++ b/homeassistant/components/ihc/switch.py @@ -1,4 +1,5 @@ """Support for IHC switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/image/__init__.py b/homeassistant/components/image/__init__.py index 9b05dcddffb..101a1cdf8c4 100644 --- a/homeassistant/components/image/__init__.py +++ b/homeassistant/components/image/__init__.py @@ -1,4 +1,5 @@ """The image integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/image/const.py b/homeassistant/components/image/const.py index d262bb460f7..d96f13b4951 100644 --- a/homeassistant/components/image/const.py +++ b/homeassistant/components/image/const.py @@ -1,4 +1,5 @@ """Constants for the image integration.""" + from typing import Final DOMAIN: Final = "image" diff --git a/homeassistant/components/image/media_source.py b/homeassistant/components/image/media_source.py index 39f00b587c0..5543ab2e887 100644 --- a/homeassistant/components/image/media_source.py +++ b/homeassistant/components/image/media_source.py @@ -1,4 +1,5 @@ """Expose iamges as media sources.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/image_processing/__init__.py b/homeassistant/components/image_processing/__init__.py index 178d40d1139..b75cb445895 100644 --- a/homeassistant/components/image_processing/__init__.py +++ b/homeassistant/components/image_processing/__init__.py @@ -1,4 +1,5 @@ """Provides functionality to interact with image processing services.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/image_upload/__init__.py b/homeassistant/components/image_upload/__init__.py index d7c5052af30..4bde9730674 100644 --- a/homeassistant/components/image_upload/__init__.py +++ b/homeassistant/components/image_upload/__init__.py @@ -1,4 +1,5 @@ """The Image Upload integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/imap/__init__.py b/homeassistant/components/imap/__init__.py index 924408c30b9..091110c5e51 100644 --- a/homeassistant/components/imap/__init__.py +++ b/homeassistant/components/imap/__init__.py @@ -1,4 +1,5 @@ """The imap integration.""" + from __future__ import annotations from aioimaplib import IMAP4_SSL, AioImapException diff --git a/homeassistant/components/imap/config_flow.py b/homeassistant/components/imap/config_flow.py index c4df769384e..414d5830bae 100644 --- a/homeassistant/components/imap/config_flow.py +++ b/homeassistant/components/imap/config_flow.py @@ -1,4 +1,5 @@ """Config flow for imap integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/imap/coordinator.py b/homeassistant/components/imap/coordinator.py index f0c9099863a..2881f9f515e 100644 --- a/homeassistant/components/imap/coordinator.py +++ b/homeassistant/components/imap/coordinator.py @@ -1,4 +1,5 @@ """Coordinator for imag integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/imap/diagnostics.py b/homeassistant/components/imap/diagnostics.py index c7d5151ba49..467f19d6338 100644 --- a/homeassistant/components/imap/diagnostics.py +++ b/homeassistant/components/imap/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for IMAP.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/imap/sensor.py b/homeassistant/components/imap/sensor.py index 07e77b31470..0a9070d7a5e 100644 --- a/homeassistant/components/imap/sensor.py +++ b/homeassistant/components/imap/sensor.py @@ -1,4 +1,5 @@ """IMAP sensor support.""" + from __future__ import annotations from homeassistant.components.sensor import ( diff --git a/homeassistant/components/improv_ble/config_flow.py b/homeassistant/components/improv_ble/config_flow.py index a7d3c2cf000..a1a2d6b1b65 100644 --- a/homeassistant/components/improv_ble/config_flow.py +++ b/homeassistant/components/improv_ble/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Improv via BLE integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/incomfort/__init__.py b/homeassistant/components/incomfort/__init__.py index 7245aff3c35..3311bda23ee 100644 --- a/homeassistant/components/incomfort/__init__.py +++ b/homeassistant/components/incomfort/__init__.py @@ -1,4 +1,5 @@ """Support for an Intergas boiler via an InComfort/Intouch Lan2RF gateway.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/incomfort/binary_sensor.py b/homeassistant/components/incomfort/binary_sensor.py index 52edfc6ef02..59096038d6c 100644 --- a/homeassistant/components/incomfort/binary_sensor.py +++ b/homeassistant/components/incomfort/binary_sensor.py @@ -1,4 +1,5 @@ """Support for an Intergas heater via an InComfort/InTouch Lan2RF gateway.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/incomfort/climate.py b/homeassistant/components/incomfort/climate.py index 0dba00ff416..cc61e179aa4 100644 --- a/homeassistant/components/incomfort/climate.py +++ b/homeassistant/components/incomfort/climate.py @@ -1,4 +1,5 @@ """Support for an Intergas boiler via an InComfort/InTouch Lan2RF gateway.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/incomfort/sensor.py b/homeassistant/components/incomfort/sensor.py index 535d8b61653..9106afacb26 100644 --- a/homeassistant/components/incomfort/sensor.py +++ b/homeassistant/components/incomfort/sensor.py @@ -1,4 +1,5 @@ """Support for an Intergas heater via an InComfort/InTouch Lan2RF gateway.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/incomfort/water_heater.py b/homeassistant/components/incomfort/water_heater.py index 367af73810b..2cd7c84a666 100644 --- a/homeassistant/components/incomfort/water_heater.py +++ b/homeassistant/components/incomfort/water_heater.py @@ -1,4 +1,5 @@ """Support for an Intergas boiler via an InComfort/Intouch Lan2RF gateway.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/influxdb/__init__.py b/homeassistant/components/influxdb/__init__.py index cd7e6a7ed88..daa49a4ba20 100644 --- a/homeassistant/components/influxdb/__init__.py +++ b/homeassistant/components/influxdb/__init__.py @@ -1,4 +1,5 @@ """Support for sending data to an Influx database.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/influxdb/const.py b/homeassistant/components/influxdb/const.py index 5ffd70fe992..cab9d1e4c41 100644 --- a/homeassistant/components/influxdb/const.py +++ b/homeassistant/components/influxdb/const.py @@ -1,4 +1,5 @@ """Constants for InfluxDB integration.""" + from datetime import timedelta import re diff --git a/homeassistant/components/influxdb/sensor.py b/homeassistant/components/influxdb/sensor.py index a46ec581207..b9ce68e198c 100644 --- a/homeassistant/components/influxdb/sensor.py +++ b/homeassistant/components/influxdb/sensor.py @@ -1,4 +1,5 @@ """InfluxDB component which allows you to get data from an Influx database.""" + from __future__ import annotations import datetime diff --git a/homeassistant/components/inkbird/__init__.py b/homeassistant/components/inkbird/__init__.py index 5ed0d6fb367..f78a6c4e1b8 100644 --- a/homeassistant/components/inkbird/__init__.py +++ b/homeassistant/components/inkbird/__init__.py @@ -1,4 +1,5 @@ """The INKBIRD Bluetooth integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/inkbird/config_flow.py b/homeassistant/components/inkbird/config_flow.py index 19c27dd5757..0d4e404c9b5 100644 --- a/homeassistant/components/inkbird/config_flow.py +++ b/homeassistant/components/inkbird/config_flow.py @@ -1,4 +1,5 @@ """Config flow for inkbird ble integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/inkbird/sensor.py b/homeassistant/components/inkbird/sensor.py index f93f2024289..a7bd71005ab 100644 --- a/homeassistant/components/inkbird/sensor.py +++ b/homeassistant/components/inkbird/sensor.py @@ -1,4 +1,5 @@ """Support for inkbird ble sensors.""" + from __future__ import annotations from inkbird_ble import DeviceClass, DeviceKey, SensorUpdate, Units diff --git a/homeassistant/components/input_boolean/__init__.py b/homeassistant/components/input_boolean/__init__.py index 613e8829aa1..91c7de96fe0 100644 --- a/homeassistant/components/input_boolean/__init__.py +++ b/homeassistant/components/input_boolean/__init__.py @@ -1,4 +1,5 @@ """Support to keep track of user controlled booleans for within automation.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/input_boolean/reproduce_state.py b/homeassistant/components/input_boolean/reproduce_state.py index 6c68489e4cb..7af28f8a92a 100644 --- a/homeassistant/components/input_boolean/reproduce_state.py +++ b/homeassistant/components/input_boolean/reproduce_state.py @@ -1,4 +1,5 @@ """Reproduce an input boolean state.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/input_button/__init__.py b/homeassistant/components/input_button/__init__.py index 3318354392c..d6c3644487b 100644 --- a/homeassistant/components/input_button/__init__.py +++ b/homeassistant/components/input_button/__init__.py @@ -1,4 +1,5 @@ """Support to keep track of user controlled buttons which can be used in automations.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/input_datetime/__init__.py b/homeassistant/components/input_datetime/__init__.py index 73a4df12d03..c64ef506670 100644 --- a/homeassistant/components/input_datetime/__init__.py +++ b/homeassistant/components/input_datetime/__init__.py @@ -1,4 +1,5 @@ """Support to select a date and/or a time.""" + from __future__ import annotations import datetime as py_datetime diff --git a/homeassistant/components/input_datetime/reproduce_state.py b/homeassistant/components/input_datetime/reproduce_state.py index 6f36be0850a..ccadbccd8d4 100644 --- a/homeassistant/components/input_datetime/reproduce_state.py +++ b/homeassistant/components/input_datetime/reproduce_state.py @@ -1,4 +1,5 @@ """Reproduce an Input datetime state.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/input_number/__init__.py b/homeassistant/components/input_number/__init__.py index 4a74201be15..e37f530b8af 100644 --- a/homeassistant/components/input_number/__init__.py +++ b/homeassistant/components/input_number/__init__.py @@ -1,4 +1,5 @@ """Support to set a numeric value from a slider or text box.""" + from __future__ import annotations from contextlib import suppress diff --git a/homeassistant/components/input_number/reproduce_state.py b/homeassistant/components/input_number/reproduce_state.py index 368f68b5178..c2f9cfc4702 100644 --- a/homeassistant/components/input_number/reproduce_state.py +++ b/homeassistant/components/input_number/reproduce_state.py @@ -1,4 +1,5 @@ """Reproduce an Input number state.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/input_select/__init__.py b/homeassistant/components/input_select/__init__.py index 4a384e0c17a..dcb75a92d20 100644 --- a/homeassistant/components/input_select/__init__.py +++ b/homeassistant/components/input_select/__init__.py @@ -1,4 +1,5 @@ """Support to select an option from a list.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/input_select/reproduce_state.py b/homeassistant/components/input_select/reproduce_state.py index 8ba16391d7e..b451f8c3f09 100644 --- a/homeassistant/components/input_select/reproduce_state.py +++ b/homeassistant/components/input_select/reproduce_state.py @@ -1,4 +1,5 @@ """Reproduce an Input select state.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/input_text/__init__.py b/homeassistant/components/input_text/__init__.py index 01bd76d1241..52788066ba2 100644 --- a/homeassistant/components/input_text/__init__.py +++ b/homeassistant/components/input_text/__init__.py @@ -1,4 +1,5 @@ """Support to enter a value into a text box.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/input_text/reproduce_state.py b/homeassistant/components/input_text/reproduce_state.py index ef82579f4b7..78e81dba95a 100644 --- a/homeassistant/components/input_text/reproduce_state.py +++ b/homeassistant/components/input_text/reproduce_state.py @@ -1,4 +1,5 @@ """Reproduce an Input text state.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/insteon/__init__.py b/homeassistant/components/insteon/__init__.py index a074ad4600b..529ac20df52 100644 --- a/homeassistant/components/insteon/__init__.py +++ b/homeassistant/components/insteon/__init__.py @@ -1,4 +1,5 @@ """Support for INSTEON Modems (PLM and Hub).""" + from contextlib import suppress import logging diff --git a/homeassistant/components/insteon/binary_sensor.py b/homeassistant/components/insteon/binary_sensor.py index 02af89dba01..fb19d2287cc 100644 --- a/homeassistant/components/insteon/binary_sensor.py +++ b/homeassistant/components/insteon/binary_sensor.py @@ -1,4 +1,5 @@ """Support for INSTEON dimmers via PowerLinc Modem.""" + from pyinsteon.groups import ( CO_SENSOR, DOOR_SENSOR, diff --git a/homeassistant/components/insteon/climate.py b/homeassistant/components/insteon/climate.py index 22bd776e1c8..ffdd17f3ac0 100644 --- a/homeassistant/components/insteon/climate.py +++ b/homeassistant/components/insteon/climate.py @@ -1,4 +1,5 @@ """Support for Insteon thermostat.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/insteon/config_flow.py b/homeassistant/components/insteon/config_flow.py index 66a131207bf..ae4216d3c65 100644 --- a/homeassistant/components/insteon/config_flow.py +++ b/homeassistant/components/insteon/config_flow.py @@ -1,4 +1,5 @@ """Test config flow for Insteon.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/insteon/fan.py b/homeassistant/components/insteon/fan.py index da9e3de6422..cbdae434df6 100644 --- a/homeassistant/components/insteon/fan.py +++ b/homeassistant/components/insteon/fan.py @@ -1,4 +1,5 @@ """Support for INSTEON fans via PowerLinc Modem.""" + from __future__ import annotations import math diff --git a/homeassistant/components/insteon/ipdb.py b/homeassistant/components/insteon/ipdb.py index 9e9f987d611..5f56c0d6976 100644 --- a/homeassistant/components/insteon/ipdb.py +++ b/homeassistant/components/insteon/ipdb.py @@ -1,4 +1,5 @@ """Utility methods for the Insteon platform.""" + from collections.abc import Iterable from pyinsteon.device_types.device_base import Device diff --git a/homeassistant/components/insteon/light.py b/homeassistant/components/insteon/light.py index 121d8d62c66..f6752db3cf1 100644 --- a/homeassistant/components/insteon/light.py +++ b/homeassistant/components/insteon/light.py @@ -1,4 +1,5 @@ """Support for Insteon lights via PowerLinc Modem.""" + from typing import Any from pyinsteon.config import ON_LEVEL diff --git a/homeassistant/components/insteon/schemas.py b/homeassistant/components/insteon/schemas.py index 497af743195..1c1b54b4747 100644 --- a/homeassistant/components/insteon/schemas.py +++ b/homeassistant/components/insteon/schemas.py @@ -1,4 +1,5 @@ """Schemas used by insteon component.""" + from __future__ import annotations from binascii import Error as HexError, unhexlify diff --git a/homeassistant/components/insteon/switch.py b/homeassistant/components/insteon/switch.py index 8acde0429cd..b60729232f2 100644 --- a/homeassistant/components/insteon/switch.py +++ b/homeassistant/components/insteon/switch.py @@ -1,4 +1,5 @@ """Support for INSTEON dimmers via PowerLinc Modem.""" + from typing import Any from homeassistant.components.switch import SwitchEntity diff --git a/homeassistant/components/insteon/utils.py b/homeassistant/components/insteon/utils.py index 1438b6c9c52..272018ea507 100644 --- a/homeassistant/components/insteon/utils.py +++ b/homeassistant/components/insteon/utils.py @@ -1,4 +1,5 @@ """Utilities used by insteon component.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/integration/__init__.py b/homeassistant/components/integration/__init__.py index f482f4e41e8..4a8d4baa3f2 100644 --- a/homeassistant/components/integration/__init__.py +++ b/homeassistant/components/integration/__init__.py @@ -1,4 +1,5 @@ """The Integration integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/integration/config_flow.py b/homeassistant/components/integration/config_flow.py index 3a9e1d15ffe..318f1355aae 100644 --- a/homeassistant/components/integration/config_flow.py +++ b/homeassistant/components/integration/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Integration - Riemann sum integral integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/integration/sensor.py b/homeassistant/components/integration/sensor.py index d7d5c84f17a..63b01d13805 100644 --- a/homeassistant/components/integration/sensor.py +++ b/homeassistant/components/integration/sensor.py @@ -1,4 +1,5 @@ """Numeric integration of data coming from a source sensor over time.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/intellifire/__init__.py b/homeassistant/components/intellifire/__init__.py index 81ef383dfab..7af472c8745 100644 --- a/homeassistant/components/intellifire/__init__.py +++ b/homeassistant/components/intellifire/__init__.py @@ -1,4 +1,5 @@ """The IntelliFire integration.""" + from __future__ import annotations from aiohttp import ClientConnectionError diff --git a/homeassistant/components/intellifire/binary_sensor.py b/homeassistant/components/intellifire/binary_sensor.py index b630828d7e9..a1b8865c876 100644 --- a/homeassistant/components/intellifire/binary_sensor.py +++ b/homeassistant/components/intellifire/binary_sensor.py @@ -1,4 +1,5 @@ """Support for IntelliFire Binary Sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/intellifire/climate.py b/homeassistant/components/intellifire/climate.py index 9fed9c08bb6..ed4facffc67 100644 --- a/homeassistant/components/intellifire/climate.py +++ b/homeassistant/components/intellifire/climate.py @@ -1,4 +1,5 @@ """Intellifire Climate Entities.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/intellifire/config_flow.py b/homeassistant/components/intellifire/config_flow.py index 17d442428e7..268fc6623d3 100644 --- a/homeassistant/components/intellifire/config_flow.py +++ b/homeassistant/components/intellifire/config_flow.py @@ -1,4 +1,5 @@ """Config flow for IntelliFire integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/intellifire/const.py b/homeassistant/components/intellifire/const.py index cae25ea11ae..5c8af1eefe9 100644 --- a/homeassistant/components/intellifire/const.py +++ b/homeassistant/components/intellifire/const.py @@ -1,4 +1,5 @@ """Constants for the IntelliFire integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/intellifire/coordinator.py b/homeassistant/components/intellifire/coordinator.py index 4045c19217b..0a46ff61435 100644 --- a/homeassistant/components/intellifire/coordinator.py +++ b/homeassistant/components/intellifire/coordinator.py @@ -1,4 +1,5 @@ """The IntelliFire integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/intellifire/entity.py b/homeassistant/components/intellifire/entity.py index 6ef63f5347c..3b35c9dabd8 100644 --- a/homeassistant/components/intellifire/entity.py +++ b/homeassistant/components/intellifire/entity.py @@ -1,4 +1,5 @@ """Platform for shared base classes for sensors.""" + from __future__ import annotations from homeassistant.helpers.entity import EntityDescription diff --git a/homeassistant/components/intellifire/fan.py b/homeassistant/components/intellifire/fan.py index 7c376eeec4c..387b6d059c6 100644 --- a/homeassistant/components/intellifire/fan.py +++ b/homeassistant/components/intellifire/fan.py @@ -1,4 +1,5 @@ """Fan definition for Intellifire.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/intellifire/light.py b/homeassistant/components/intellifire/light.py index a807735ed79..a7f2befaf33 100644 --- a/homeassistant/components/intellifire/light.py +++ b/homeassistant/components/intellifire/light.py @@ -1,4 +1,5 @@ """The IntelliFire Light.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/intellifire/number.py b/homeassistant/components/intellifire/number.py index 4cedb3de5d9..dca7a74c78e 100644 --- a/homeassistant/components/intellifire/number.py +++ b/homeassistant/components/intellifire/number.py @@ -1,4 +1,5 @@ """Flame height number sensors.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/intellifire/sensor.py b/homeassistant/components/intellifire/sensor.py index 583e2dc22f9..dd3eef9c9b4 100644 --- a/homeassistant/components/intellifire/sensor.py +++ b/homeassistant/components/intellifire/sensor.py @@ -1,4 +1,5 @@ """Platform for sensor integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/intellifire/switch.py b/homeassistant/components/intellifire/switch.py index 161d75de2d8..00de6d74a9c 100644 --- a/homeassistant/components/intellifire/switch.py +++ b/homeassistant/components/intellifire/switch.py @@ -1,4 +1,5 @@ """Define switch func.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/intent_script/__init__.py b/homeassistant/components/intent_script/__init__.py index d184dad47c9..63b37c08950 100644 --- a/homeassistant/components/intent_script/__init__.py +++ b/homeassistant/components/intent_script/__init__.py @@ -1,4 +1,5 @@ """Handle intents with scripts.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/intesishome/climate.py b/homeassistant/components/intesishome/climate.py index 64f52fae0a6..7a504d7aced 100644 --- a/homeassistant/components/intesishome/climate.py +++ b/homeassistant/components/intesishome/climate.py @@ -1,4 +1,5 @@ """Support for IntesisHome and airconwithme Smart AC Controllers.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/ios/config_flow.py b/homeassistant/components/ios/config_flow.py index 47959e34074..6b00589d048 100644 --- a/homeassistant/components/ios/config_flow.py +++ b/homeassistant/components/ios/config_flow.py @@ -1,4 +1,5 @@ """Config flow for iOS.""" + from homeassistant.helpers import config_entry_flow from .const import DOMAIN diff --git a/homeassistant/components/ios/notify.py b/homeassistant/components/ios/notify.py index a8d1b2514cd..92a706b3a38 100644 --- a/homeassistant/components/ios/notify.py +++ b/homeassistant/components/ios/notify.py @@ -1,4 +1,5 @@ """Support for iOS push notifications.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/ios/sensor.py b/homeassistant/components/ios/sensor.py index 59a9d499d93..4171b8ecd46 100644 --- a/homeassistant/components/ios/sensor.py +++ b/homeassistant/components/ios/sensor.py @@ -1,4 +1,5 @@ """Support for Home Assistant iOS app sensors.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/iotawatt/__init__.py b/homeassistant/components/iotawatt/__init__.py index 9f51382f98e..8f35d4e0796 100644 --- a/homeassistant/components/iotawatt/__init__.py +++ b/homeassistant/components/iotawatt/__init__.py @@ -1,4 +1,5 @@ """The iotawatt integration.""" + from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/iotawatt/config_flow.py b/homeassistant/components/iotawatt/config_flow.py index 6b7b86b73af..b9310b8a2b9 100644 --- a/homeassistant/components/iotawatt/config_flow.py +++ b/homeassistant/components/iotawatt/config_flow.py @@ -1,4 +1,5 @@ """Config flow for iotawatt integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/iotawatt/const.py b/homeassistant/components/iotawatt/const.py index db847f3dfe8..de008388f62 100644 --- a/homeassistant/components/iotawatt/const.py +++ b/homeassistant/components/iotawatt/const.py @@ -1,4 +1,5 @@ """Constants for the IoTaWatt integration.""" + from __future__ import annotations import json diff --git a/homeassistant/components/iotawatt/coordinator.py b/homeassistant/components/iotawatt/coordinator.py index 6c97fc99169..e741c7a5a27 100644 --- a/homeassistant/components/iotawatt/coordinator.py +++ b/homeassistant/components/iotawatt/coordinator.py @@ -1,4 +1,5 @@ """IoTaWatt DataUpdateCoordinator.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/iotawatt/sensor.py b/homeassistant/components/iotawatt/sensor.py index 4faac347c40..c9af588c160 100644 --- a/homeassistant/components/iotawatt/sensor.py +++ b/homeassistant/components/iotawatt/sensor.py @@ -1,4 +1,5 @@ """Support for IoTaWatt Energy monitor.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/iperf3/__init__.py b/homeassistant/components/iperf3/__init__.py index 0448c3e48b2..a621f1fb27e 100644 --- a/homeassistant/components/iperf3/__init__.py +++ b/homeassistant/components/iperf3/__init__.py @@ -1,4 +1,5 @@ """Support for Iperf3 network measurement tool.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/iperf3/sensor.py b/homeassistant/components/iperf3/sensor.py index d3db0e76631..27b3eac26b5 100644 --- a/homeassistant/components/iperf3/sensor.py +++ b/homeassistant/components/iperf3/sensor.py @@ -1,4 +1,5 @@ """Support for Iperf3 sensors.""" + from __future__ import annotations from homeassistant.components.sensor import SensorEntity, SensorEntityDescription diff --git a/homeassistant/components/ipma/const.py b/homeassistant/components/ipma/const.py index 26fdee779b6..dd6f1fba64a 100644 --- a/homeassistant/components/ipma/const.py +++ b/homeassistant/components/ipma/const.py @@ -1,4 +1,5 @@ """Constants for IPMA component.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/ipma/entity.py b/homeassistant/components/ipma/entity.py index 7eb8e2fe1a7..ef9401fcb07 100644 --- a/homeassistant/components/ipma/entity.py +++ b/homeassistant/components/ipma/entity.py @@ -1,4 +1,5 @@ """Base Entity for IPMA.""" + from __future__ import annotations from pyipma.api import IPMA_API diff --git a/homeassistant/components/ipma/sensor.py b/homeassistant/components/ipma/sensor.py index 99e994069a5..5f2cb98646b 100644 --- a/homeassistant/components/ipma/sensor.py +++ b/homeassistant/components/ipma/sensor.py @@ -1,4 +1,5 @@ """Support for IPMA sensors.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/ipma/system_health.py b/homeassistant/components/ipma/system_health.py index cd783490c35..7b6a5c517c7 100644 --- a/homeassistant/components/ipma/system_health.py +++ b/homeassistant/components/ipma/system_health.py @@ -1,4 +1,5 @@ """Provide info to system health.""" + from homeassistant.components import system_health from homeassistant.core import HomeAssistant, callback diff --git a/homeassistant/components/ipma/weather.py b/homeassistant/components/ipma/weather.py index 866f44f0617..cd4c650beef 100644 --- a/homeassistant/components/ipma/weather.py +++ b/homeassistant/components/ipma/weather.py @@ -1,4 +1,5 @@ """Support for IPMA weather service.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/ipp/__init__.py b/homeassistant/components/ipp/__init__.py index 98870c44f5a..10f24a1499d 100644 --- a/homeassistant/components/ipp/__init__.py +++ b/homeassistant/components/ipp/__init__.py @@ -1,4 +1,5 @@ """The Internet Printing Protocol (IPP) integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/ipp/config_flow.py b/homeassistant/components/ipp/config_flow.py index 334fb5d7690..ecd4d1af9f6 100644 --- a/homeassistant/components/ipp/config_flow.py +++ b/homeassistant/components/ipp/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the IPP integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/ipp/coordinator.py b/homeassistant/components/ipp/coordinator.py index 8eb8c972fab..535b18bcaf0 100644 --- a/homeassistant/components/ipp/coordinator.py +++ b/homeassistant/components/ipp/coordinator.py @@ -1,4 +1,5 @@ """Coordinator for The Internet Printing Protocol (IPP) integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/ipp/entity.py b/homeassistant/components/ipp/entity.py index 05adf711fd9..fdaa4cf035e 100644 --- a/homeassistant/components/ipp/entity.py +++ b/homeassistant/components/ipp/entity.py @@ -1,4 +1,5 @@ """Entities for The Internet Printing Protocol (IPP) integration.""" + from __future__ import annotations from homeassistant.helpers.device_registry import DeviceInfo diff --git a/homeassistant/components/ipp/sensor.py b/homeassistant/components/ipp/sensor.py index 72fe0751f9f..8e3162ec61d 100644 --- a/homeassistant/components/ipp/sensor.py +++ b/homeassistant/components/ipp/sensor.py @@ -1,4 +1,5 @@ """Support for IPP sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/iqvia/__init__.py b/homeassistant/components/iqvia/__init__.py index aa5528cc06a..8f85d98c576 100644 --- a/homeassistant/components/iqvia/__init__.py +++ b/homeassistant/components/iqvia/__init__.py @@ -1,4 +1,5 @@ """Support for IQVIA.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/iqvia/config_flow.py b/homeassistant/components/iqvia/config_flow.py index d293aedd7b2..444d86a7fb8 100644 --- a/homeassistant/components/iqvia/config_flow.py +++ b/homeassistant/components/iqvia/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the IQVIA component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/iqvia/diagnostics.py b/homeassistant/components/iqvia/diagnostics.py index 6f2df6bd7d3..64827f183ff 100644 --- a/homeassistant/components/iqvia/diagnostics.py +++ b/homeassistant/components/iqvia/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for IQVIA.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/iqvia/sensor.py b/homeassistant/components/iqvia/sensor.py index d17a278a106..da8556d9218 100644 --- a/homeassistant/components/iqvia/sensor.py +++ b/homeassistant/components/iqvia/sensor.py @@ -1,4 +1,5 @@ """Support for IQVIA sensors.""" + from __future__ import annotations from statistics import mean diff --git a/homeassistant/components/irish_rail_transport/sensor.py b/homeassistant/components/irish_rail_transport/sensor.py index 70b53b80d9c..b0ad9372f86 100644 --- a/homeassistant/components/irish_rail_transport/sensor.py +++ b/homeassistant/components/irish_rail_transport/sensor.py @@ -1,4 +1,5 @@ """Support for Irish Rail RTPI information.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/islamic_prayer_times/__init__.py b/homeassistant/components/islamic_prayer_times/__init__.py index 55e5618d9d4..15e165d2f48 100644 --- a/homeassistant/components/islamic_prayer_times/__init__.py +++ b/homeassistant/components/islamic_prayer_times/__init__.py @@ -1,4 +1,5 @@ """The islamic_prayer_times component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/islamic_prayer_times/config_flow.py b/homeassistant/components/islamic_prayer_times/config_flow.py index 766163a9b0d..12730c9be08 100644 --- a/homeassistant/components/islamic_prayer_times/config_flow.py +++ b/homeassistant/components/islamic_prayer_times/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Islamic Prayer Times integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/islamic_prayer_times/const.py b/homeassistant/components/islamic_prayer_times/const.py index 926651738a2..dc4237e5efa 100644 --- a/homeassistant/components/islamic_prayer_times/const.py +++ b/homeassistant/components/islamic_prayer_times/const.py @@ -1,4 +1,5 @@ """Constants for the Islamic Prayer component.""" + from typing import Final DOMAIN: Final = "islamic_prayer_times" diff --git a/homeassistant/components/islamic_prayer_times/coordinator.py b/homeassistant/components/islamic_prayer_times/coordinator.py index be138e7b45b..d70d0e2f4fe 100644 --- a/homeassistant/components/islamic_prayer_times/coordinator.py +++ b/homeassistant/components/islamic_prayer_times/coordinator.py @@ -1,4 +1,5 @@ """Coordinator for the Islamic prayer times integration.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/islamic_prayer_times/sensor.py b/homeassistant/components/islamic_prayer_times/sensor.py index 70b2c9d9cc6..eb042d83c49 100644 --- a/homeassistant/components/islamic_prayer_times/sensor.py +++ b/homeassistant/components/islamic_prayer_times/sensor.py @@ -1,4 +1,5 @@ """Platform to retrieve Islamic prayer times information for Home Assistant.""" + from datetime import datetime from homeassistant.components.sensor import ( diff --git a/homeassistant/components/iss/__init__.py b/homeassistant/components/iss/__init__.py index 640e9d5d1da..606263ce769 100644 --- a/homeassistant/components/iss/__init__.py +++ b/homeassistant/components/iss/__init__.py @@ -1,4 +1,5 @@ """The iss component.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/iss/sensor.py b/homeassistant/components/iss/sensor.py index d7b7083cdef..f4f91f0099e 100644 --- a/homeassistant/components/iss/sensor.py +++ b/homeassistant/components/iss/sensor.py @@ -1,4 +1,5 @@ """Support for iss sensor.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/isy994/__init__.py b/homeassistant/components/isy994/__init__.py index 0c5ea27a0b9..0c238182849 100644 --- a/homeassistant/components/isy994/__init__.py +++ b/homeassistant/components/isy994/__init__.py @@ -1,4 +1,5 @@ """Support the Universal Devices ISY/IoX controllers.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/isy994/binary_sensor.py b/homeassistant/components/isy994/binary_sensor.py index 7be3b87a0d3..c130ba32746 100644 --- a/homeassistant/components/isy994/binary_sensor.py +++ b/homeassistant/components/isy994/binary_sensor.py @@ -1,4 +1,5 @@ """Support for ISY binary sensors.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/isy994/button.py b/homeassistant/components/isy994/button.py index 6e00e1934f2..9e0a3320f6a 100644 --- a/homeassistant/components/isy994/button.py +++ b/homeassistant/components/isy994/button.py @@ -1,4 +1,5 @@ """Representation of ISY/IoX buttons.""" + from __future__ import annotations from pyisy import ISY diff --git a/homeassistant/components/isy994/climate.py b/homeassistant/components/isy994/climate.py index 06b73978456..ba64fe887bc 100644 --- a/homeassistant/components/isy994/climate.py +++ b/homeassistant/components/isy994/climate.py @@ -1,4 +1,5 @@ """Support for Insteon Thermostats via ISY Platform.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/isy994/config_flow.py b/homeassistant/components/isy994/config_flow.py index 658f7204d41..c66e8af4022 100644 --- a/homeassistant/components/isy994/config_flow.py +++ b/homeassistant/components/isy994/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Universal Devices ISY/IoX integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/isy994/cover.py b/homeassistant/components/isy994/cover.py index 2ada6339295..19e8a3da197 100644 --- a/homeassistant/components/isy994/cover.py +++ b/homeassistant/components/isy994/cover.py @@ -1,4 +1,5 @@ """Support for ISY covers.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/isy994/entity.py b/homeassistant/components/isy994/entity.py index a93f2d91d31..893b33644fe 100644 --- a/homeassistant/components/isy994/entity.py +++ b/homeassistant/components/isy994/entity.py @@ -1,4 +1,5 @@ """Representation of ISYEntity Types.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/isy994/fan.py b/homeassistant/components/isy994/fan.py index ebdef4146e0..a7d79c29549 100644 --- a/homeassistant/components/isy994/fan.py +++ b/homeassistant/components/isy994/fan.py @@ -1,4 +1,5 @@ """Support for ISY fans.""" + from __future__ import annotations import math diff --git a/homeassistant/components/isy994/helpers.py b/homeassistant/components/isy994/helpers.py index 5e0ff592ea9..1e496446a30 100644 --- a/homeassistant/components/isy994/helpers.py +++ b/homeassistant/components/isy994/helpers.py @@ -1,4 +1,5 @@ """Sorting helpers for ISY device classifications.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/isy994/light.py b/homeassistant/components/isy994/light.py index b16b4ca5a83..ec026a2dc22 100644 --- a/homeassistant/components/isy994/light.py +++ b/homeassistant/components/isy994/light.py @@ -1,4 +1,5 @@ """Support for ISY lights.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/isy994/lock.py b/homeassistant/components/isy994/lock.py index 67c2587a238..73b10990d29 100644 --- a/homeassistant/components/isy994/lock.py +++ b/homeassistant/components/isy994/lock.py @@ -1,4 +1,5 @@ """Support for ISY locks.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/isy994/models.py b/homeassistant/components/isy994/models.py index c8a7e1dbefe..5b599df9458 100644 --- a/homeassistant/components/isy994/models.py +++ b/homeassistant/components/isy994/models.py @@ -1,4 +1,5 @@ """The ISY/IoX integration data models.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/isy994/number.py b/homeassistant/components/isy994/number.py index baadf3b2dc7..c8feba1bf8d 100644 --- a/homeassistant/components/isy994/number.py +++ b/homeassistant/components/isy994/number.py @@ -1,4 +1,5 @@ """Support for ISY number entities.""" + from __future__ import annotations from dataclasses import replace diff --git a/homeassistant/components/isy994/select.py b/homeassistant/components/isy994/select.py index 3c55e5cbda9..41e5899504d 100644 --- a/homeassistant/components/isy994/select.py +++ b/homeassistant/components/isy994/select.py @@ -1,4 +1,5 @@ """Support for ISY select entities.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/isy994/sensor.py b/homeassistant/components/isy994/sensor.py index 9e39f5d04e4..94c333346af 100644 --- a/homeassistant/components/isy994/sensor.py +++ b/homeassistant/components/isy994/sensor.py @@ -1,4 +1,5 @@ """Support for ISY sensors.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/isy994/services.py b/homeassistant/components/isy994/services.py index a6adfcfb917..9159627c9eb 100644 --- a/homeassistant/components/isy994/services.py +++ b/homeassistant/components/isy994/services.py @@ -1,4 +1,5 @@ """ISY Services and Commands.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/isy994/switch.py b/homeassistant/components/isy994/switch.py index da208dcc79c..391ad18e02f 100644 --- a/homeassistant/components/isy994/switch.py +++ b/homeassistant/components/isy994/switch.py @@ -1,4 +1,5 @@ """Support for ISY switches.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/isy994/system_health.py b/homeassistant/components/isy994/system_health.py index 44286111a62..dfc45c267dd 100644 --- a/homeassistant/components/isy994/system_health.py +++ b/homeassistant/components/isy994/system_health.py @@ -1,4 +1,5 @@ """Provide info to system health.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/isy994/util.py b/homeassistant/components/isy994/util.py index f4846b61aed..ed1a5abca8b 100644 --- a/homeassistant/components/isy994/util.py +++ b/homeassistant/components/isy994/util.py @@ -1,4 +1,5 @@ """ISY utils.""" + from __future__ import annotations from homeassistant.core import HomeAssistant, callback diff --git a/homeassistant/components/itach/remote.py b/homeassistant/components/itach/remote.py index c0dddfa080e..606ca4fd021 100644 --- a/homeassistant/components/itach/remote.py +++ b/homeassistant/components/itach/remote.py @@ -1,4 +1,5 @@ """Support for iTach IR devices.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/itunes/media_player.py b/homeassistant/components/itunes/media_player.py index d73086f9ab1..13ad66f1417 100644 --- a/homeassistant/components/itunes/media_player.py +++ b/homeassistant/components/itunes/media_player.py @@ -1,4 +1,5 @@ """Support for interfacing to iTunes API.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/izone/climate.py b/homeassistant/components/izone/climate.py index e85b7ef4d56..1786ef23522 100644 --- a/homeassistant/components/izone/climate.py +++ b/homeassistant/components/izone/climate.py @@ -1,4 +1,5 @@ """Support for the iZone HVAC.""" + from __future__ import annotations from collections.abc import Callable, Mapping