diff --git a/homeassistant/components/jellyfin/__init__.py b/homeassistant/components/jellyfin/__init__.py index 2e9e6bb71f7..c24f06d7b19 100644 --- a/homeassistant/components/jellyfin/__init__.py +++ b/homeassistant/components/jellyfin/__init__.py @@ -1,4 +1,5 @@ """The Jellyfin integration.""" + from typing import Any from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/jellyfin/browse_media.py b/homeassistant/components/jellyfin/browse_media.py index ac47bcf732f..2af2bac4875 100644 --- a/homeassistant/components/jellyfin/browse_media.py +++ b/homeassistant/components/jellyfin/browse_media.py @@ -1,4 +1,5 @@ """Support for media browsing.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/jellyfin/client_wrapper.py b/homeassistant/components/jellyfin/client_wrapper.py index ab771d405ea..ab5d5e7d7f8 100644 --- a/homeassistant/components/jellyfin/client_wrapper.py +++ b/homeassistant/components/jellyfin/client_wrapper.py @@ -1,4 +1,5 @@ """Utility methods for initializing a Jellyfin client.""" + from __future__ import annotations import socket diff --git a/homeassistant/components/jellyfin/config_flow.py b/homeassistant/components/jellyfin/config_flow.py index b6702722006..5ccff4ffdb3 100644 --- a/homeassistant/components/jellyfin/config_flow.py +++ b/homeassistant/components/jellyfin/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the Jellyfin integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/jellyfin/coordinator.py b/homeassistant/components/jellyfin/coordinator.py index f4ab98ca268..4d907ac1531 100644 --- a/homeassistant/components/jellyfin/coordinator.py +++ b/homeassistant/components/jellyfin/coordinator.py @@ -1,4 +1,5 @@ """Data update coordinator for the Jellyfin integration.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/jellyfin/diagnostics.py b/homeassistant/components/jellyfin/diagnostics.py index 36b2882fbeb..ecc66868bd0 100644 --- a/homeassistant/components/jellyfin/diagnostics.py +++ b/homeassistant/components/jellyfin/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Jellyfin.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/jellyfin/entity.py b/homeassistant/components/jellyfin/entity.py index e45557fa4b6..2204a36dc61 100644 --- a/homeassistant/components/jellyfin/entity.py +++ b/homeassistant/components/jellyfin/entity.py @@ -1,4 +1,5 @@ """Base Entity for Jellyfin.""" + from __future__ import annotations from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo diff --git a/homeassistant/components/jellyfin/media_player.py b/homeassistant/components/jellyfin/media_player.py index 76343818702..ec1f11de9d7 100644 --- a/homeassistant/components/jellyfin/media_player.py +++ b/homeassistant/components/jellyfin/media_player.py @@ -1,4 +1,5 @@ """Support for the Jellyfin media player.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/jellyfin/media_source.py b/homeassistant/components/jellyfin/media_source.py index 3bbe3e0b184..add04d1a1ec 100644 --- a/homeassistant/components/jellyfin/media_source.py +++ b/homeassistant/components/jellyfin/media_source.py @@ -1,4 +1,5 @@ """The Media Source implementation for the Jellyfin integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/jellyfin/models.py b/homeassistant/components/jellyfin/models.py index b6365042127..bfa639a7567 100644 --- a/homeassistant/components/jellyfin/models.py +++ b/homeassistant/components/jellyfin/models.py @@ -1,4 +1,5 @@ """Models for the Jellyfin integration.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/jellyfin/sensor.py b/homeassistant/components/jellyfin/sensor.py index df503d14378..b4341d2a190 100644 --- a/homeassistant/components/jellyfin/sensor.py +++ b/homeassistant/components/jellyfin/sensor.py @@ -1,4 +1,5 @@ """Support for Jellyfin sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/jewish_calendar/__init__.py b/homeassistant/components/jewish_calendar/__init__.py index 550ca2d9e5d..1ce5386d2c2 100644 --- a/homeassistant/components/jewish_calendar/__init__.py +++ b/homeassistant/components/jewish_calendar/__init__.py @@ -1,4 +1,5 @@ """The jewish_calendar component.""" + from __future__ import annotations from hdate import Location diff --git a/homeassistant/components/jewish_calendar/binary_sensor.py b/homeassistant/components/jewish_calendar/binary_sensor.py index 638d54d6159..73ddca27cc1 100644 --- a/homeassistant/components/jewish_calendar/binary_sensor.py +++ b/homeassistant/components/jewish_calendar/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Jewish Calendar binary sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/jewish_calendar/sensor.py b/homeassistant/components/jewish_calendar/sensor.py index b20364f7e64..2a16ecb9c14 100644 --- a/homeassistant/components/jewish_calendar/sensor.py +++ b/homeassistant/components/jewish_calendar/sensor.py @@ -1,4 +1,5 @@ """Platform to retrieve Jewish calendar information for Home Assistant.""" + from __future__ import annotations from datetime import date as Date diff --git a/homeassistant/components/joaoapps_join/notify.py b/homeassistant/components/joaoapps_join/notify.py index 33eede4dc21..6e9efc4da21 100644 --- a/homeassistant/components/joaoapps_join/notify.py +++ b/homeassistant/components/joaoapps_join/notify.py @@ -1,4 +1,5 @@ """Support for Join notifications.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/juicenet/__init__.py b/homeassistant/components/juicenet/__init__.py index bcefe763e15..5c32caab36f 100644 --- a/homeassistant/components/juicenet/__init__.py +++ b/homeassistant/components/juicenet/__init__.py @@ -1,4 +1,5 @@ """The JuiceNet integration.""" + from datetime import timedelta import logging diff --git a/homeassistant/components/juicenet/number.py b/homeassistant/components/juicenet/number.py index fd2535c5bf3..173ebd45265 100644 --- a/homeassistant/components/juicenet/number.py +++ b/homeassistant/components/juicenet/number.py @@ -1,4 +1,5 @@ """Support for controlling juicenet/juicepoint/juicebox based EVSE numbers.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/juicenet/sensor.py b/homeassistant/components/juicenet/sensor.py index 5f71e066b9c..1f0b815cd97 100644 --- a/homeassistant/components/juicenet/sensor.py +++ b/homeassistant/components/juicenet/sensor.py @@ -1,4 +1,5 @@ """Support for monitoring juicenet/juicepoint/juicebox based EVSE sensors.""" + from __future__ import annotations from homeassistant.components.sensor import ( diff --git a/homeassistant/components/juicenet/switch.py b/homeassistant/components/juicenet/switch.py index 7c373eeeb24..a0075fe6c3e 100644 --- a/homeassistant/components/juicenet/switch.py +++ b/homeassistant/components/juicenet/switch.py @@ -1,4 +1,5 @@ """Support for monitoring juicenet/juicepoint/juicebox based EVSE switches.""" + from typing import Any from homeassistant.components.switch import SwitchEntity diff --git a/homeassistant/components/justnimbus/__init__.py b/homeassistant/components/justnimbus/__init__.py index c30e213814e..e4be25b8959 100644 --- a/homeassistant/components/justnimbus/__init__.py +++ b/homeassistant/components/justnimbus/__init__.py @@ -1,4 +1,5 @@ """The JustNimbus integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/justnimbus/config_flow.py b/homeassistant/components/justnimbus/config_flow.py index 08c02d40f94..2a286c41b5f 100644 --- a/homeassistant/components/justnimbus/config_flow.py +++ b/homeassistant/components/justnimbus/config_flow.py @@ -1,4 +1,5 @@ """Config flow for JustNimbus integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/justnimbus/coordinator.py b/homeassistant/components/justnimbus/coordinator.py index 9dc7dcbc743..4031ad86fdf 100644 --- a/homeassistant/components/justnimbus/coordinator.py +++ b/homeassistant/components/justnimbus/coordinator.py @@ -1,4 +1,5 @@ """JustNimbus coordinator.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/justnimbus/entity.py b/homeassistant/components/justnimbus/entity.py index 7303d4ec2c7..f85c3f33f93 100644 --- a/homeassistant/components/justnimbus/entity.py +++ b/homeassistant/components/justnimbus/entity.py @@ -1,4 +1,5 @@ """Base Entity for JustNimbus sensors.""" + from __future__ import annotations from homeassistant.helpers.device_registry import DeviceInfo diff --git a/homeassistant/components/justnimbus/sensor.py b/homeassistant/components/justnimbus/sensor.py index 6a570a56003..5acea40fd52 100644 --- a/homeassistant/components/justnimbus/sensor.py +++ b/homeassistant/components/justnimbus/sensor.py @@ -1,4 +1,5 @@ """Support for the JustNimbus platform.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/kaiterra/air_quality.py b/homeassistant/components/kaiterra/air_quality.py index edbddb361c9..4d0d83a38eb 100644 --- a/homeassistant/components/kaiterra/air_quality.py +++ b/homeassistant/components/kaiterra/air_quality.py @@ -1,4 +1,5 @@ """Support for Kaiterra Air Quality Sensors.""" + from __future__ import annotations from homeassistant.components.air_quality import AirQualityEntity diff --git a/homeassistant/components/kaiterra/sensor.py b/homeassistant/components/kaiterra/sensor.py index bb780aab619..fa15cb9b451 100644 --- a/homeassistant/components/kaiterra/sensor.py +++ b/homeassistant/components/kaiterra/sensor.py @@ -1,4 +1,5 @@ """Support for Kaiterra Temperature ahn Humidity Sensors.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/kaleidescape/media_player.py b/homeassistant/components/kaleidescape/media_player.py index 7751f6b6a29..33acb899728 100644 --- a/homeassistant/components/kaleidescape/media_player.py +++ b/homeassistant/components/kaleidescape/media_player.py @@ -1,4 +1,5 @@ """Kaleidescape Media Player.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/kankun/switch.py b/homeassistant/components/kankun/switch.py index f64b11706a1..f650494b3b1 100644 --- a/homeassistant/components/kankun/switch.py +++ b/homeassistant/components/kankun/switch.py @@ -1,4 +1,5 @@ """Support for customised Kankun SP3 Wifi switch.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/keba/binary_sensor.py b/homeassistant/components/keba/binary_sensor.py index 7997130c90a..9f8e0ac3f3e 100644 --- a/homeassistant/components/keba/binary_sensor.py +++ b/homeassistant/components/keba/binary_sensor.py @@ -1,4 +1,5 @@ """Support for KEBA charging station binary sensors.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/keba/lock.py b/homeassistant/components/keba/lock.py index de8d28d7739..be005b92874 100644 --- a/homeassistant/components/keba/lock.py +++ b/homeassistant/components/keba/lock.py @@ -1,4 +1,5 @@ """Support for KEBA charging station switch.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/keba/notify.py b/homeassistant/components/keba/notify.py index 78b3976f656..5358ba32ff9 100644 --- a/homeassistant/components/keba/notify.py +++ b/homeassistant/components/keba/notify.py @@ -1,4 +1,5 @@ """Support for Keba notifications.""" + from __future__ import annotations from homeassistant.components.notify import ATTR_DATA, BaseNotificationService diff --git a/homeassistant/components/keba/sensor.py b/homeassistant/components/keba/sensor.py index 635683419b2..74c08933cbe 100644 --- a/homeassistant/components/keba/sensor.py +++ b/homeassistant/components/keba/sensor.py @@ -1,4 +1,5 @@ """Support for KEBA charging station sensors.""" + from __future__ import annotations from homeassistant.components.sensor import ( diff --git a/homeassistant/components/keenetic_ndms2/__init__.py b/homeassistant/components/keenetic_ndms2/__init__.py index 6f33b11742a..e2ca17ebce8 100644 --- a/homeassistant/components/keenetic_ndms2/__init__.py +++ b/homeassistant/components/keenetic_ndms2/__init__.py @@ -1,4 +1,5 @@ """The keenetic_ndms2 component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/keenetic_ndms2/binary_sensor.py b/homeassistant/components/keenetic_ndms2/binary_sensor.py index ab0b3370197..cb7d83b9238 100644 --- a/homeassistant/components/keenetic_ndms2/binary_sensor.py +++ b/homeassistant/components/keenetic_ndms2/binary_sensor.py @@ -1,4 +1,5 @@ """The Keenetic Client class.""" + from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, diff --git a/homeassistant/components/keenetic_ndms2/config_flow.py b/homeassistant/components/keenetic_ndms2/config_flow.py index 553204512e5..f00bbe22939 100644 --- a/homeassistant/components/keenetic_ndms2/config_flow.py +++ b/homeassistant/components/keenetic_ndms2/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Keenetic NDMS2.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/keenetic_ndms2/device_tracker.py b/homeassistant/components/keenetic_ndms2/device_tracker.py index c9e81071ad7..e15c96d8353 100644 --- a/homeassistant/components/keenetic_ndms2/device_tracker.py +++ b/homeassistant/components/keenetic_ndms2/device_tracker.py @@ -1,4 +1,5 @@ """Support for Keenetic routers as device tracker.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/keenetic_ndms2/router.py b/homeassistant/components/keenetic_ndms2/router.py index 77101dcbf3e..5a4f32a05cd 100644 --- a/homeassistant/components/keenetic_ndms2/router.py +++ b/homeassistant/components/keenetic_ndms2/router.py @@ -1,4 +1,5 @@ """The Keenetic Client class.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/kef/media_player.py b/homeassistant/components/kef/media_player.py index b8407fd8bde..03f3468dc15 100644 --- a/homeassistant/components/kef/media_player.py +++ b/homeassistant/components/kef/media_player.py @@ -1,4 +1,5 @@ """Platform for the KEF Wireless Speakers.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/kegtron/__init__.py b/homeassistant/components/kegtron/__init__.py index 7a1669bdcd4..55b93a0da3d 100644 --- a/homeassistant/components/kegtron/__init__.py +++ b/homeassistant/components/kegtron/__init__.py @@ -1,4 +1,5 @@ """The Kegtron integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/kegtron/config_flow.py b/homeassistant/components/kegtron/config_flow.py index 8e657de800d..8dfb28f0caa 100644 --- a/homeassistant/components/kegtron/config_flow.py +++ b/homeassistant/components/kegtron/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Kegtron ble integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/kegtron/device.py b/homeassistant/components/kegtron/device.py index 85516a3aea3..033094e41d7 100644 --- a/homeassistant/components/kegtron/device.py +++ b/homeassistant/components/kegtron/device.py @@ -1,4 +1,5 @@ """Support for Kegtron devices.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/kegtron/sensor.py b/homeassistant/components/kegtron/sensor.py index 8e1ed539385..4fc4ac9242f 100644 --- a/homeassistant/components/kegtron/sensor.py +++ b/homeassistant/components/kegtron/sensor.py @@ -1,4 +1,5 @@ """Support for Kegtron sensors.""" + from __future__ import annotations from kegtron_ble import ( diff --git a/homeassistant/components/keyboard/__init__.py b/homeassistant/components/keyboard/__init__.py index d129505515d..bf935f119d0 100644 --- a/homeassistant/components/keyboard/__init__.py +++ b/homeassistant/components/keyboard/__init__.py @@ -1,4 +1,5 @@ """Support to emulate keyboard presses on host machine.""" + from pykeyboard import PyKeyboard import voluptuous as vol diff --git a/homeassistant/components/keyboard_remote/__init__.py b/homeassistant/components/keyboard_remote/__init__.py index eecde05d1f4..5831a770466 100644 --- a/homeassistant/components/keyboard_remote/__init__.py +++ b/homeassistant/components/keyboard_remote/__init__.py @@ -1,4 +1,5 @@ """Receive signals from a keyboard and use it as a remote control.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/keymitt_ble/__init__.py b/homeassistant/components/keymitt_ble/__init__.py index 1a7df4fe0a9..7fea46d7a02 100644 --- a/homeassistant/components/keymitt_ble/__init__.py +++ b/homeassistant/components/keymitt_ble/__init__.py @@ -1,4 +1,5 @@ """Integration to integrate Keymitt BLE devices with Home Assistant.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/keymitt_ble/config_flow.py b/homeassistant/components/keymitt_ble/config_flow.py index d0fb6ff0317..589798a281a 100644 --- a/homeassistant/components/keymitt_ble/config_flow.py +++ b/homeassistant/components/keymitt_ble/config_flow.py @@ -1,4 +1,5 @@ """Adds config flow for MicroBot.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/keymitt_ble/coordinator.py b/homeassistant/components/keymitt_ble/coordinator.py index e3a995e3813..3e72826ac5d 100644 --- a/homeassistant/components/keymitt_ble/coordinator.py +++ b/homeassistant/components/keymitt_ble/coordinator.py @@ -1,4 +1,5 @@ """Integration to integrate Keymitt BLE devices with Home Assistant.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/keymitt_ble/entity.py b/homeassistant/components/keymitt_ble/entity.py index a9294bce239..b5229e6917e 100644 --- a/homeassistant/components/keymitt_ble/entity.py +++ b/homeassistant/components/keymitt_ble/entity.py @@ -1,4 +1,5 @@ """MicroBot class.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/keymitt_ble/switch.py b/homeassistant/components/keymitt_ble/switch.py index 4c9f0c335a7..2c255ecdf28 100644 --- a/homeassistant/components/keymitt_ble/switch.py +++ b/homeassistant/components/keymitt_ble/switch.py @@ -1,4 +1,5 @@ """Switch platform for MicroBot.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/kira/remote.py b/homeassistant/components/kira/remote.py index 4c06216a210..f6ee4af75ef 100644 --- a/homeassistant/components/kira/remote.py +++ b/homeassistant/components/kira/remote.py @@ -1,4 +1,5 @@ """Support for Keene Electronics IR-IP devices.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/kira/sensor.py b/homeassistant/components/kira/sensor.py index e1a4f08dd14..5779ed4df35 100644 --- a/homeassistant/components/kira/sensor.py +++ b/homeassistant/components/kira/sensor.py @@ -1,4 +1,5 @@ """KIRA interface to receive UDP packets from an IR-IP bridge.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/kitchen_sink/__init__.py b/homeassistant/components/kitchen_sink/__init__.py index 228803097d6..6b6694c920d 100644 --- a/homeassistant/components/kitchen_sink/__init__.py +++ b/homeassistant/components/kitchen_sink/__init__.py @@ -3,6 +3,7 @@ This sets up a demo environment of features which are obscure or which represent incorrect behavior, and are thus not wanted in the demo integration. """ + from __future__ import annotations import datetime diff --git a/homeassistant/components/kitchen_sink/button.py b/homeassistant/components/kitchen_sink/button.py index cdc0cebb348..5c62c4b32d1 100644 --- a/homeassistant/components/kitchen_sink/button.py +++ b/homeassistant/components/kitchen_sink/button.py @@ -1,4 +1,5 @@ """Demo platform that offers a fake button entity.""" + from __future__ import annotations from homeassistant.components import persistent_notification diff --git a/homeassistant/components/kitchen_sink/config_flow.py b/homeassistant/components/kitchen_sink/config_flow.py index 56df82047ad..93c8a292ba9 100644 --- a/homeassistant/components/kitchen_sink/config_flow.py +++ b/homeassistant/components/kitchen_sink/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the Kitchen Sink component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/kitchen_sink/image.py b/homeassistant/components/kitchen_sink/image.py index 4fe20f08de9..504b36464f5 100644 --- a/homeassistant/components/kitchen_sink/image.py +++ b/homeassistant/components/kitchen_sink/image.py @@ -1,4 +1,5 @@ """Demo image platform.""" + from __future__ import annotations from pathlib import Path diff --git a/homeassistant/components/kitchen_sink/lawn_mower.py b/homeassistant/components/kitchen_sink/lawn_mower.py index 119b37b7569..50ec70f6759 100644 --- a/homeassistant/components/kitchen_sink/lawn_mower.py +++ b/homeassistant/components/kitchen_sink/lawn_mower.py @@ -1,4 +1,5 @@ """Demo platform that has a couple fake lawn mowers.""" + from __future__ import annotations from homeassistant.components.lawn_mower import ( diff --git a/homeassistant/components/kitchen_sink/lock.py b/homeassistant/components/kitchen_sink/lock.py index b25941cf1a3..228e383e94d 100644 --- a/homeassistant/components/kitchen_sink/lock.py +++ b/homeassistant/components/kitchen_sink/lock.py @@ -1,4 +1,5 @@ """Demo platform that has a couple of fake locks.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/kitchen_sink/sensor.py b/homeassistant/components/kitchen_sink/sensor.py index 4800104d17d..95e56c276e4 100644 --- a/homeassistant/components/kitchen_sink/sensor.py +++ b/homeassistant/components/kitchen_sink/sensor.py @@ -1,4 +1,5 @@ """Demo platform that has a couple of fake sensors.""" + from __future__ import annotations from homeassistant.components.sensor import ( diff --git a/homeassistant/components/kitchen_sink/switch.py b/homeassistant/components/kitchen_sink/switch.py index e60de2f09c8..68a8312b496 100644 --- a/homeassistant/components/kitchen_sink/switch.py +++ b/homeassistant/components/kitchen_sink/switch.py @@ -1,4 +1,5 @@ """Demo platform that has some fake switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/kitchen_sink/weather.py b/homeassistant/components/kitchen_sink/weather.py index 8449b68b460..0ade3e73889 100644 --- a/homeassistant/components/kitchen_sink/weather.py +++ b/homeassistant/components/kitchen_sink/weather.py @@ -1,4 +1,5 @@ """Demo platform that offers fake meteorological data.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/kiwi/lock.py b/homeassistant/components/kiwi/lock.py index 44dc2bb2521..770b842091c 100644 --- a/homeassistant/components/kiwi/lock.py +++ b/homeassistant/components/kiwi/lock.py @@ -1,4 +1,5 @@ """Support for the KIWI.KI lock platform.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/kmtronic/config_flow.py b/homeassistant/components/kmtronic/config_flow.py index e1d0bf95d09..dd0a7652418 100644 --- a/homeassistant/components/kmtronic/config_flow.py +++ b/homeassistant/components/kmtronic/config_flow.py @@ -1,4 +1,5 @@ """Config flow for kmtronic integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/kmtronic/switch.py b/homeassistant/components/kmtronic/switch.py index 144c05e927e..f00ecf8623c 100644 --- a/homeassistant/components/kmtronic/switch.py +++ b/homeassistant/components/kmtronic/switch.py @@ -1,4 +1,5 @@ """KMtronic Switch integration.""" + from typing import Any import urllib.parse diff --git a/homeassistant/components/knx/__init__.py b/homeassistant/components/knx/__init__.py index c6869f34eeb..c84d53d6039 100644 --- a/homeassistant/components/knx/__init__.py +++ b/homeassistant/components/knx/__init__.py @@ -1,4 +1,5 @@ """Support KNX devices.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/knx/binary_sensor.py b/homeassistant/components/knx/binary_sensor.py index 9005ca707b9..dee56608421 100644 --- a/homeassistant/components/knx/binary_sensor.py +++ b/homeassistant/components/knx/binary_sensor.py @@ -1,4 +1,5 @@ """Support for KNX/IP binary sensors.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/knx/button.py b/homeassistant/components/knx/button.py index 94b5b51e401..a38d8ad1b6c 100644 --- a/homeassistant/components/knx/button.py +++ b/homeassistant/components/knx/button.py @@ -1,4 +1,5 @@ """Support for KNX/IP buttons.""" + from __future__ import annotations from xknx import XKNX diff --git a/homeassistant/components/knx/climate.py b/homeassistant/components/knx/climate.py index 1038cdde80f..30b7a3bba74 100644 --- a/homeassistant/components/knx/climate.py +++ b/homeassistant/components/knx/climate.py @@ -1,4 +1,5 @@ """Support for KNX/IP climate devices.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/knx/config_flow.py b/homeassistant/components/knx/config_flow.py index e095f71f924..bac16798f63 100644 --- a/homeassistant/components/knx/config_flow.py +++ b/homeassistant/components/knx/config_flow.py @@ -1,4 +1,5 @@ """Config flow for KNX.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/knx/const.py b/homeassistant/components/knx/const.py index 8cb1986c540..9c0d5e1125a 100644 --- a/homeassistant/components/knx/const.py +++ b/homeassistant/components/knx/const.py @@ -1,4 +1,5 @@ """Constants for the KNX integration.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/knx/cover.py b/homeassistant/components/knx/cover.py index 9e86fc8b36e..9d86d6ac272 100644 --- a/homeassistant/components/knx/cover.py +++ b/homeassistant/components/knx/cover.py @@ -1,4 +1,5 @@ """Support for KNX/IP covers.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/knx/date.py b/homeassistant/components/knx/date.py index 1f286d59ecb..fa20a8d04c5 100644 --- a/homeassistant/components/knx/date.py +++ b/homeassistant/components/knx/date.py @@ -1,4 +1,5 @@ """Support for KNX/IP date.""" + from __future__ import annotations from datetime import date as dt_date diff --git a/homeassistant/components/knx/datetime.py b/homeassistant/components/knx/datetime.py index fc63df04233..47d9b9f55b2 100644 --- a/homeassistant/components/knx/datetime.py +++ b/homeassistant/components/knx/datetime.py @@ -1,4 +1,5 @@ """Support for KNX/IP datetime.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/knx/device.py b/homeassistant/components/knx/device.py index 583ca2f768b..fd5abc6a072 100644 --- a/homeassistant/components/knx/device.py +++ b/homeassistant/components/knx/device.py @@ -1,4 +1,5 @@ """Handle KNX Devices.""" + from __future__ import annotations from xknx import XKNX diff --git a/homeassistant/components/knx/device_trigger.py b/homeassistant/components/knx/device_trigger.py index 867a7c075b0..93e1623f88c 100644 --- a/homeassistant/components/knx/device_trigger.py +++ b/homeassistant/components/knx/device_trigger.py @@ -1,4 +1,5 @@ """Provides device triggers for KNX.""" + from __future__ import annotations from typing import Any, Final diff --git a/homeassistant/components/knx/diagnostics.py b/homeassistant/components/knx/diagnostics.py index 2fada718d31..1907539fc61 100644 --- a/homeassistant/components/knx/diagnostics.py +++ b/homeassistant/components/knx/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for KNX.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/knx/expose.py b/homeassistant/components/knx/expose.py index d5c871d59ba..aee6e148e62 100644 --- a/homeassistant/components/knx/expose.py +++ b/homeassistant/components/knx/expose.py @@ -1,4 +1,5 @@ """Exposures to KNX bus.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/knx/fan.py b/homeassistant/components/knx/fan.py index a22a16a6e69..e94609bdc86 100644 --- a/homeassistant/components/knx/fan.py +++ b/homeassistant/components/knx/fan.py @@ -1,4 +1,5 @@ """Support for KNX/IP fans.""" + from __future__ import annotations import math diff --git a/homeassistant/components/knx/knx_entity.py b/homeassistant/components/knx/knx_entity.py index 9545510e635..b03c59486e5 100644 --- a/homeassistant/components/knx/knx_entity.py +++ b/homeassistant/components/knx/knx_entity.py @@ -1,4 +1,5 @@ """Base class for KNX devices.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/knx/light.py b/homeassistant/components/knx/light.py index f25e78a4d70..b1c1681a817 100644 --- a/homeassistant/components/knx/light.py +++ b/homeassistant/components/knx/light.py @@ -1,4 +1,5 @@ """Support for KNX/IP lights.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/knx/notify.py b/homeassistant/components/knx/notify.py index 9d190ac78b0..21f8290586a 100644 --- a/homeassistant/components/knx/notify.py +++ b/homeassistant/components/knx/notify.py @@ -1,4 +1,5 @@ """Support for KNX/IP notification services.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/knx/number.py b/homeassistant/components/knx/number.py index fbf4db3f5b2..8a9f1dea87c 100644 --- a/homeassistant/components/knx/number.py +++ b/homeassistant/components/knx/number.py @@ -1,4 +1,5 @@ """Support for KNX/IP numeric values.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/knx/project.py b/homeassistant/components/knx/project.py index d47241b174b..13e71dbbe38 100644 --- a/homeassistant/components/knx/project.py +++ b/homeassistant/components/knx/project.py @@ -1,4 +1,5 @@ """Handle KNX project data.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/knx/scene.py b/homeassistant/components/knx/scene.py index a028cebc8f7..342d0f9eb83 100644 --- a/homeassistant/components/knx/scene.py +++ b/homeassistant/components/knx/scene.py @@ -1,4 +1,5 @@ """Support for KNX scenes.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/knx/schema.py b/homeassistant/components/knx/schema.py index d559cd2005a..39670b4f92b 100644 --- a/homeassistant/components/knx/schema.py +++ b/homeassistant/components/knx/schema.py @@ -1,4 +1,5 @@ """Voluptuous schemas for the KNX integration.""" + from __future__ import annotations from abc import ABC diff --git a/homeassistant/components/knx/select.py b/homeassistant/components/knx/select.py index 2852917e021..5d7532e0e5d 100644 --- a/homeassistant/components/knx/select.py +++ b/homeassistant/components/knx/select.py @@ -1,4 +1,5 @@ """Support for KNX/IP select entities.""" + from __future__ import annotations from xknx import XKNX diff --git a/homeassistant/components/knx/sensor.py b/homeassistant/components/knx/sensor.py index be6359c783d..173979f78dc 100644 --- a/homeassistant/components/knx/sensor.py +++ b/homeassistant/components/knx/sensor.py @@ -1,4 +1,5 @@ """Support for KNX/IP sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/knx/services.py b/homeassistant/components/knx/services.py index 99c44a5eee6..24b9452cf60 100644 --- a/homeassistant/components/knx/services.py +++ b/homeassistant/components/knx/services.py @@ -1,4 +1,5 @@ """KNX integration services.""" + from __future__ import annotations from functools import partial diff --git a/homeassistant/components/knx/switch.py b/homeassistant/components/knx/switch.py index 81f8de815c9..096ce235e2c 100644 --- a/homeassistant/components/knx/switch.py +++ b/homeassistant/components/knx/switch.py @@ -1,4 +1,5 @@ """Support for KNX/IP switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/knx/telegrams.py b/homeassistant/components/knx/telegrams.py index 95250d99f85..7c3ea28c4df 100644 --- a/homeassistant/components/knx/telegrams.py +++ b/homeassistant/components/knx/telegrams.py @@ -1,4 +1,5 @@ """KNX Telegram handler.""" + from __future__ import annotations from collections import deque diff --git a/homeassistant/components/knx/text.py b/homeassistant/components/knx/text.py index abd3f44ae6b..22d008cd5ce 100644 --- a/homeassistant/components/knx/text.py +++ b/homeassistant/components/knx/text.py @@ -1,4 +1,5 @@ """Support for KNX/IP text.""" + from __future__ import annotations from xknx import XKNX diff --git a/homeassistant/components/knx/time.py b/homeassistant/components/knx/time.py index af8ee48b806..c11b40d13dc 100644 --- a/homeassistant/components/knx/time.py +++ b/homeassistant/components/knx/time.py @@ -1,4 +1,5 @@ """Support for KNX/IP time.""" + from __future__ import annotations from datetime import time as dt_time diff --git a/homeassistant/components/knx/validation.py b/homeassistant/components/knx/validation.py index c0ac93d19eb..9fe87a2c3f6 100644 --- a/homeassistant/components/knx/validation.py +++ b/homeassistant/components/knx/validation.py @@ -1,4 +1,5 @@ """Validation helpers for KNX config schemas.""" + from collections.abc import Callable import ipaddress from typing import Any diff --git a/homeassistant/components/knx/weather.py b/homeassistant/components/knx/weather.py index 92034be95ff..90796f26f1a 100644 --- a/homeassistant/components/knx/weather.py +++ b/homeassistant/components/knx/weather.py @@ -1,4 +1,5 @@ """Support for KNX/IP weather station.""" + from __future__ import annotations from xknx import XKNX diff --git a/homeassistant/components/knx/websocket.py b/homeassistant/components/knx/websocket.py index e3eb5de8530..f6869902793 100644 --- a/homeassistant/components/knx/websocket.py +++ b/homeassistant/components/knx/websocket.py @@ -1,4 +1,5 @@ """KNX Websocket API.""" + from __future__ import annotations from typing import TYPE_CHECKING, Final diff --git a/homeassistant/components/kodi/config_flow.py b/homeassistant/components/kodi/config_flow.py index 74fc5e0cb09..30cac5dbdd4 100644 --- a/homeassistant/components/kodi/config_flow.py +++ b/homeassistant/components/kodi/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Kodi integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/kodi/device_trigger.py b/homeassistant/components/kodi/device_trigger.py index 3f931d1e264..8659872f8c1 100644 --- a/homeassistant/components/kodi/device_trigger.py +++ b/homeassistant/components/kodi/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for Kodi.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/kodi/media_player.py b/homeassistant/components/kodi/media_player.py index bca1c7f6f0e..74140ca873c 100644 --- a/homeassistant/components/kodi/media_player.py +++ b/homeassistant/components/kodi/media_player.py @@ -1,4 +1,5 @@ """Support for interfacing with the XBMC/Kodi JSON-RPC API.""" + from __future__ import annotations from collections.abc import Awaitable, Callable, Coroutine diff --git a/homeassistant/components/kodi/notify.py b/homeassistant/components/kodi/notify.py index f3459e891b7..7d65321a807 100644 --- a/homeassistant/components/kodi/notify.py +++ b/homeassistant/components/kodi/notify.py @@ -1,4 +1,5 @@ """Kodi notification service.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/konnected/binary_sensor.py b/homeassistant/components/konnected/binary_sensor.py index d7c41337342..75c381c53f2 100644 --- a/homeassistant/components/konnected/binary_sensor.py +++ b/homeassistant/components/konnected/binary_sensor.py @@ -1,4 +1,5 @@ """Support for wired binary sensors attached to a Konnected device.""" + from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( diff --git a/homeassistant/components/konnected/config_flow.py b/homeassistant/components/konnected/config_flow.py index f6225760feb..e2b460042f1 100644 --- a/homeassistant/components/konnected/config_flow.py +++ b/homeassistant/components/konnected/config_flow.py @@ -1,4 +1,5 @@ """Config flow for konnected.io integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/konnected/errors.py b/homeassistant/components/konnected/errors.py index 5a0207f3f8d..a377942a02f 100644 --- a/homeassistant/components/konnected/errors.py +++ b/homeassistant/components/konnected/errors.py @@ -1,4 +1,5 @@ """Errors for the Konnected component.""" + from homeassistant.exceptions import HomeAssistantError diff --git a/homeassistant/components/konnected/sensor.py b/homeassistant/components/konnected/sensor.py index 3f203d5f3e8..6191f98f179 100644 --- a/homeassistant/components/konnected/sensor.py +++ b/homeassistant/components/konnected/sensor.py @@ -1,4 +1,5 @@ """Support for DHT and DS18B20 sensors attached to a Konnected device.""" + from __future__ import annotations from homeassistant.components.sensor import ( diff --git a/homeassistant/components/kostal_plenticore/diagnostics.py b/homeassistant/components/kostal_plenticore/diagnostics.py index eef9f05537f..9b78265971c 100644 --- a/homeassistant/components/kostal_plenticore/diagnostics.py +++ b/homeassistant/components/kostal_plenticore/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Kostal Plenticore.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/kostal_plenticore/helper.py b/homeassistant/components/kostal_plenticore/helper.py index a04415a4f31..d9117625d19 100644 --- a/homeassistant/components/kostal_plenticore/helper.py +++ b/homeassistant/components/kostal_plenticore/helper.py @@ -1,4 +1,5 @@ """Code to handle the Plenticore API.""" + from __future__ import annotations from collections import defaultdict diff --git a/homeassistant/components/kostal_plenticore/number.py b/homeassistant/components/kostal_plenticore/number.py index 36e1fc95eb8..d53982535da 100644 --- a/homeassistant/components/kostal_plenticore/number.py +++ b/homeassistant/components/kostal_plenticore/number.py @@ -1,4 +1,5 @@ """Platform for Kostal Plenticore numbers.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/kostal_plenticore/select.py b/homeassistant/components/kostal_plenticore/select.py index 321bc4e5d70..2f6d9334071 100644 --- a/homeassistant/components/kostal_plenticore/select.py +++ b/homeassistant/components/kostal_plenticore/select.py @@ -1,4 +1,5 @@ """Platform for Kostal Plenticore select widgets.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/kostal_plenticore/sensor.py b/homeassistant/components/kostal_plenticore/sensor.py index 237a50f85b7..88714620a46 100644 --- a/homeassistant/components/kostal_plenticore/sensor.py +++ b/homeassistant/components/kostal_plenticore/sensor.py @@ -1,4 +1,5 @@ """Platform for Kostal Plenticore sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/kostal_plenticore/switch.py b/homeassistant/components/kostal_plenticore/switch.py index 509a3610884..f1e75edd5bd 100644 --- a/homeassistant/components/kostal_plenticore/switch.py +++ b/homeassistant/components/kostal_plenticore/switch.py @@ -1,4 +1,5 @@ """Platform for Kostal Plenticore switches.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/kraken/__init__.py b/homeassistant/components/kraken/__init__.py index 395de951bbd..692f602460b 100644 --- a/homeassistant/components/kraken/__init__.py +++ b/homeassistant/components/kraken/__init__.py @@ -1,4 +1,5 @@ """The kraken integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/kraken/config_flow.py b/homeassistant/components/kraken/config_flow.py index fba08b63071..3375746f25d 100644 --- a/homeassistant/components/kraken/config_flow.py +++ b/homeassistant/components/kraken/config_flow.py @@ -1,4 +1,5 @@ """Config flow for kraken integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/kraken/const.py b/homeassistant/components/kraken/const.py index 8a5f7fa828f..3b1bc29c7cd 100644 --- a/homeassistant/components/kraken/const.py +++ b/homeassistant/components/kraken/const.py @@ -1,4 +1,5 @@ """Constants for the kraken integration.""" + from __future__ import annotations from typing import TypedDict diff --git a/homeassistant/components/kraken/sensor.py b/homeassistant/components/kraken/sensor.py index 7e55da2b189..bcffe394bff 100644 --- a/homeassistant/components/kraken/sensor.py +++ b/homeassistant/components/kraken/sensor.py @@ -1,4 +1,5 @@ """The kraken integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/kraken/utils.py b/homeassistant/components/kraken/utils.py index 3c3d80dafb6..210756a7792 100644 --- a/homeassistant/components/kraken/utils.py +++ b/homeassistant/components/kraken/utils.py @@ -1,4 +1,5 @@ """Utility functions for the kraken integration.""" + from __future__ import annotations from pykrakenapi.pykrakenapi import KrakenAPI diff --git a/homeassistant/components/kulersky/light.py b/homeassistant/components/kulersky/light.py index 6636bfdba9f..cb98e52250f 100644 --- a/homeassistant/components/kulersky/light.py +++ b/homeassistant/components/kulersky/light.py @@ -1,4 +1,5 @@ """Kuler Sky light platform.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/kwb/sensor.py b/homeassistant/components/kwb/sensor.py index c15cff72655..950c0ed7d76 100644 --- a/homeassistant/components/kwb/sensor.py +++ b/homeassistant/components/kwb/sensor.py @@ -1,4 +1,5 @@ """Support for KWB Easyfire.""" + from __future__ import annotations from pykwb import kwb diff --git a/homeassistant/components/lacrosse/sensor.py b/homeassistant/components/lacrosse/sensor.py index 40d38da55eb..c059248b422 100644 --- a/homeassistant/components/lacrosse/sensor.py +++ b/homeassistant/components/lacrosse/sensor.py @@ -1,4 +1,5 @@ """Support for LaCrosse sensor components.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/lacrosse_view/__init__.py b/homeassistant/components/lacrosse_view/__init__.py index 86793a94a4b..d977af418a2 100644 --- a/homeassistant/components/lacrosse_view/__init__.py +++ b/homeassistant/components/lacrosse_view/__init__.py @@ -1,4 +1,5 @@ """The LaCrosse View integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lacrosse_view/config_flow.py b/homeassistant/components/lacrosse_view/config_flow.py index db6def15835..805afc40d2b 100644 --- a/homeassistant/components/lacrosse_view/config_flow.py +++ b/homeassistant/components/lacrosse_view/config_flow.py @@ -1,4 +1,5 @@ """Config flow for LaCrosse View integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/lacrosse_view/coordinator.py b/homeassistant/components/lacrosse_view/coordinator.py index b45fe3ae1b4..5ec02a86709 100644 --- a/homeassistant/components/lacrosse_view/coordinator.py +++ b/homeassistant/components/lacrosse_view/coordinator.py @@ -1,4 +1,5 @@ """DataUpdateCoordinator for LaCrosse View.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/lacrosse_view/diagnostics.py b/homeassistant/components/lacrosse_view/diagnostics.py index 754cc39d38e..eaf3ded6a4a 100644 --- a/homeassistant/components/lacrosse_view/diagnostics.py +++ b/homeassistant/components/lacrosse_view/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for LaCrosse View.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lacrosse_view/sensor.py b/homeassistant/components/lacrosse_view/sensor.py index 960ab0ff325..fb2c34101ac 100644 --- a/homeassistant/components/lacrosse_view/sensor.py +++ b/homeassistant/components/lacrosse_view/sensor.py @@ -1,4 +1,5 @@ """Sensor component for LaCrosse View.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/lamarzocco/config_flow.py b/homeassistant/components/lamarzocco/config_flow.py index d9fa21c5419..de960f364ce 100644 --- a/homeassistant/components/lamarzocco/config_flow.py +++ b/homeassistant/components/lamarzocco/config_flow.py @@ -1,4 +1,5 @@ """Config flow for La Marzocco integration.""" + from collections.abc import Mapping import logging from typing import Any diff --git a/homeassistant/components/lamarzocco/coordinator.py b/homeassistant/components/lamarzocco/coordinator.py index 438c4e42634..85fb8bb8854 100644 --- a/homeassistant/components/lamarzocco/coordinator.py +++ b/homeassistant/components/lamarzocco/coordinator.py @@ -1,4 +1,5 @@ """Coordinator for La Marzocco API.""" + from collections.abc import Callable, Coroutine from datetime import timedelta import logging diff --git a/homeassistant/components/lamarzocco/switch.py b/homeassistant/components/lamarzocco/switch.py index 0d4d8d7dc8e..d8f5edec6b9 100644 --- a/homeassistant/components/lamarzocco/switch.py +++ b/homeassistant/components/lamarzocco/switch.py @@ -1,4 +1,5 @@ """Switch platform for La Marzocco espresso machines.""" + from collections.abc import Callable, Coroutine from dataclasses import dataclass from typing import Any diff --git a/homeassistant/components/lametric/__init__.py b/homeassistant/components/lametric/__init__.py index 867b80cf408..10fdee0ddc7 100644 --- a/homeassistant/components/lametric/__init__.py +++ b/homeassistant/components/lametric/__init__.py @@ -1,4 +1,5 @@ """Support for LaMetric time.""" + from homeassistant.components import notify as hass_notify from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_NAME, Platform diff --git a/homeassistant/components/lametric/application_credentials.py b/homeassistant/components/lametric/application_credentials.py index ab763c8f6fb..9c478be67f0 100644 --- a/homeassistant/components/lametric/application_credentials.py +++ b/homeassistant/components/lametric/application_credentials.py @@ -1,4 +1,5 @@ """Application credentials platform for LaMetric.""" + from homeassistant.components.application_credentials import AuthorizationServer from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/lametric/button.py b/homeassistant/components/lametric/button.py index dacbf8d2445..3f894495f4b 100644 --- a/homeassistant/components/lametric/button.py +++ b/homeassistant/components/lametric/button.py @@ -1,4 +1,5 @@ """Support for LaMetric buttons.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/lametric/config_flow.py b/homeassistant/components/lametric/config_flow.py index 0fdd566fada..ed1477e1149 100644 --- a/homeassistant/components/lametric/config_flow.py +++ b/homeassistant/components/lametric/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the LaMetric integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/lametric/coordinator.py b/homeassistant/components/lametric/coordinator.py index 88f34adf45c..6655b035740 100644 --- a/homeassistant/components/lametric/coordinator.py +++ b/homeassistant/components/lametric/coordinator.py @@ -1,4 +1,5 @@ """DataUpdateCoordinator for the LaMatric integration.""" + from __future__ import annotations from demetriek import Device, LaMetricAuthenticationError, LaMetricDevice, LaMetricError diff --git a/homeassistant/components/lametric/diagnostics.py b/homeassistant/components/lametric/diagnostics.py index 256f5f06e91..69c681e911a 100644 --- a/homeassistant/components/lametric/diagnostics.py +++ b/homeassistant/components/lametric/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for LaMetric.""" + from __future__ import annotations import json diff --git a/homeassistant/components/lametric/entity.py b/homeassistant/components/lametric/entity.py index 54626a3838d..43539f13185 100644 --- a/homeassistant/components/lametric/entity.py +++ b/homeassistant/components/lametric/entity.py @@ -1,4 +1,5 @@ """Base entity for the LaMetric integration.""" + from __future__ import annotations from homeassistant.helpers.device_registry import ( diff --git a/homeassistant/components/lametric/helpers.py b/homeassistant/components/lametric/helpers.py index 3a3014a369e..24c028da78c 100644 --- a/homeassistant/components/lametric/helpers.py +++ b/homeassistant/components/lametric/helpers.py @@ -1,4 +1,5 @@ """Helpers for LaMetric.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/lametric/notify.py b/homeassistant/components/lametric/notify.py index d8b9627238c..7362f0ca402 100644 --- a/homeassistant/components/lametric/notify.py +++ b/homeassistant/components/lametric/notify.py @@ -1,4 +1,5 @@ """Support for LaMetric notifications.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lametric/number.py b/homeassistant/components/lametric/number.py index 9acdc6f1411..704a9e7fbe7 100644 --- a/homeassistant/components/lametric/number.py +++ b/homeassistant/components/lametric/number.py @@ -1,4 +1,5 @@ """Support for LaMetric numbers.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/lametric/select.py b/homeassistant/components/lametric/select.py index c7a3f55125b..dd81fd69877 100644 --- a/homeassistant/components/lametric/select.py +++ b/homeassistant/components/lametric/select.py @@ -1,4 +1,5 @@ """Support for LaMetric selects.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/lametric/sensor.py b/homeassistant/components/lametric/sensor.py index 5ef3608d33b..3e516789dce 100644 --- a/homeassistant/components/lametric/sensor.py +++ b/homeassistant/components/lametric/sensor.py @@ -1,4 +1,5 @@ """Support for LaMetric sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/lametric/services.py b/homeassistant/components/lametric/services.py index a20680267d9..d5191e0a434 100644 --- a/homeassistant/components/lametric/services.py +++ b/homeassistant/components/lametric/services.py @@ -1,4 +1,5 @@ """Support for LaMetric time services.""" + from __future__ import annotations from demetriek import ( diff --git a/homeassistant/components/lametric/switch.py b/homeassistant/components/lametric/switch.py index 7fda3a22b8f..d8afa2d076b 100644 --- a/homeassistant/components/lametric/switch.py +++ b/homeassistant/components/lametric/switch.py @@ -1,4 +1,5 @@ """Support for LaMetric switches.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/landisgyr_heat_meter/__init__.py b/homeassistant/components/landisgyr_heat_meter/__init__.py index 101216cd0d4..4e52e246d81 100644 --- a/homeassistant/components/landisgyr_heat_meter/__init__.py +++ b/homeassistant/components/landisgyr_heat_meter/__init__.py @@ -1,4 +1,5 @@ """The Landis+Gyr Heat Meter integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/landisgyr_heat_meter/config_flow.py b/homeassistant/components/landisgyr_heat_meter/config_flow.py index 64f4555c8fb..f7288b8a0cd 100644 --- a/homeassistant/components/landisgyr_heat_meter/config_flow.py +++ b/homeassistant/components/landisgyr_heat_meter/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Landis+Gyr Heat Meter integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/landisgyr_heat_meter/sensor.py b/homeassistant/components/landisgyr_heat_meter/sensor.py index 075aeb67b50..a06e87f83fa 100644 --- a/homeassistant/components/landisgyr_heat_meter/sensor.py +++ b/homeassistant/components/landisgyr_heat_meter/sensor.py @@ -1,4 +1,5 @@ """Platform for sensor integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/lannouncer/notify.py b/homeassistant/components/lannouncer/notify.py index eb89ac416f8..525372710af 100644 --- a/homeassistant/components/lannouncer/notify.py +++ b/homeassistant/components/lannouncer/notify.py @@ -1,4 +1,5 @@ """Lannouncer platform for notify component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lastfm/__init__.py b/homeassistant/components/lastfm/__init__.py index 72dcf08a2d0..ebcc929c39c 100644 --- a/homeassistant/components/lastfm/__init__.py +++ b/homeassistant/components/lastfm/__init__.py @@ -1,4 +1,5 @@ """The lastfm component.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/lastfm/config_flow.py b/homeassistant/components/lastfm/config_flow.py index 51791de54fb..154409ac66d 100644 --- a/homeassistant/components/lastfm/config_flow.py +++ b/homeassistant/components/lastfm/config_flow.py @@ -1,4 +1,5 @@ """Config flow for LastFm.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lastfm/coordinator.py b/homeassistant/components/lastfm/coordinator.py index 6e62fe2c84e..18473745450 100644 --- a/homeassistant/components/lastfm/coordinator.py +++ b/homeassistant/components/lastfm/coordinator.py @@ -1,4 +1,5 @@ """DataUpdateCoordinator for the LastFM integration.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/lastfm/sensor.py b/homeassistant/components/lastfm/sensor.py index 045fac0c727..48770113a80 100644 --- a/homeassistant/components/lastfm/sensor.py +++ b/homeassistant/components/lastfm/sensor.py @@ -1,4 +1,5 @@ """Sensor for Last.fm account status.""" + from __future__ import annotations import hashlib diff --git a/homeassistant/components/launch_library/__init__.py b/homeassistant/components/launch_library/__init__.py index e85c9c81566..23bf159ac61 100644 --- a/homeassistant/components/launch_library/__init__.py +++ b/homeassistant/components/launch_library/__init__.py @@ -1,4 +1,5 @@ """The launch_library component.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/launch_library/config_flow.py b/homeassistant/components/launch_library/config_flow.py index 3349efb9c28..3cdff3650b3 100644 --- a/homeassistant/components/launch_library/config_flow.py +++ b/homeassistant/components/launch_library/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure launch library component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/launch_library/diagnostics.py b/homeassistant/components/launch_library/diagnostics.py index 35665e1b39e..35d0a699ab5 100644 --- a/homeassistant/components/launch_library/diagnostics.py +++ b/homeassistant/components/launch_library/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Launch Library.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/launch_library/sensor.py b/homeassistant/components/launch_library/sensor.py index 2c1934f0c16..4deb444f929 100644 --- a/homeassistant/components/launch_library/sensor.py +++ b/homeassistant/components/launch_library/sensor.py @@ -1,4 +1,5 @@ """Support for Launch Library sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/laundrify/__init__.py b/homeassistant/components/laundrify/__init__.py index 4bfb84082d5..9eb15625319 100644 --- a/homeassistant/components/laundrify/__init__.py +++ b/homeassistant/components/laundrify/__init__.py @@ -1,4 +1,5 @@ """The laundrify integration.""" + from __future__ import annotations from laundrify_aio import LaundrifyAPI diff --git a/homeassistant/components/laundrify/binary_sensor.py b/homeassistant/components/laundrify/binary_sensor.py index 099575f226f..80732bdc470 100644 --- a/homeassistant/components/laundrify/binary_sensor.py +++ b/homeassistant/components/laundrify/binary_sensor.py @@ -1,4 +1,5 @@ """Platform for binary sensor integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/laundrify/config_flow.py b/homeassistant/components/laundrify/config_flow.py index e11ef88f2df..c131befd7d4 100644 --- a/homeassistant/components/laundrify/config_flow.py +++ b/homeassistant/components/laundrify/config_flow.py @@ -1,4 +1,5 @@ """Config flow for laundrify integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/laundrify/model.py b/homeassistant/components/laundrify/model.py index aa6bf77509f..862824c3154 100644 --- a/homeassistant/components/laundrify/model.py +++ b/homeassistant/components/laundrify/model.py @@ -1,4 +1,5 @@ """Models for laundrify platform.""" + from __future__ import annotations from typing import TypedDict diff --git a/homeassistant/components/lawn_mower/__init__.py b/homeassistant/components/lawn_mower/__init__.py index b1eac0a6609..5be457ab88f 100644 --- a/homeassistant/components/lawn_mower/__init__.py +++ b/homeassistant/components/lawn_mower/__init__.py @@ -1,4 +1,5 @@ """The lawn mower integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/lawn_mower/const.py b/homeassistant/components/lawn_mower/const.py index 706c9616450..e060abe6423 100644 --- a/homeassistant/components/lawn_mower/const.py +++ b/homeassistant/components/lawn_mower/const.py @@ -1,4 +1,5 @@ """Constants for the lawn mower integration.""" + from enum import IntFlag, StrEnum diff --git a/homeassistant/components/lcn/__init__.py b/homeassistant/components/lcn/__init__.py index 527c3de7c9e..6866a10d55e 100644 --- a/homeassistant/components/lcn/__init__.py +++ b/homeassistant/components/lcn/__init__.py @@ -1,4 +1,5 @@ """Support for LCN devices.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/lcn/binary_sensor.py b/homeassistant/components/lcn/binary_sensor.py index ceeeecf50c4..2670777d9b3 100644 --- a/homeassistant/components/lcn/binary_sensor.py +++ b/homeassistant/components/lcn/binary_sensor.py @@ -1,4 +1,5 @@ """Support for LCN binary sensors.""" + from __future__ import annotations import pypck diff --git a/homeassistant/components/lcn/climate.py b/homeassistant/components/lcn/climate.py index d1e92d54fb1..abe0080811d 100644 --- a/homeassistant/components/lcn/climate.py +++ b/homeassistant/components/lcn/climate.py @@ -1,4 +1,5 @@ """Support for LCN climate control.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/lcn/config_flow.py b/homeassistant/components/lcn/config_flow.py index 87dc9c2b602..d05eb896f27 100644 --- a/homeassistant/components/lcn/config_flow.py +++ b/homeassistant/components/lcn/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the LCN integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lcn/const.py b/homeassistant/components/lcn/const.py index e8da5b39073..bcf9ecdf295 100644 --- a/homeassistant/components/lcn/const.py +++ b/homeassistant/components/lcn/const.py @@ -1,4 +1,5 @@ """Constants for the LCN component.""" + from itertools import product from homeassistant.const import Platform diff --git a/homeassistant/components/lcn/cover.py b/homeassistant/components/lcn/cover.py index 31b2dbface0..6738add28e4 100644 --- a/homeassistant/components/lcn/cover.py +++ b/homeassistant/components/lcn/cover.py @@ -1,4 +1,5 @@ """Support for LCN covers.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lcn/device_trigger.py b/homeassistant/components/lcn/device_trigger.py index 46a94929d0b..42b5506110f 100644 --- a/homeassistant/components/lcn/device_trigger.py +++ b/homeassistant/components/lcn/device_trigger.py @@ -1,4 +1,5 @@ """Provides device triggers for LCN.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/lcn/helpers.py b/homeassistant/components/lcn/helpers.py index 8cb0201033e..b0b1a2f1c04 100644 --- a/homeassistant/components/lcn/helpers.py +++ b/homeassistant/components/lcn/helpers.py @@ -1,4 +1,5 @@ """Helpers for LCN component.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lcn/light.py b/homeassistant/components/lcn/light.py index 65c1344edf0..3f1467c74c1 100644 --- a/homeassistant/components/lcn/light.py +++ b/homeassistant/components/lcn/light.py @@ -1,4 +1,5 @@ """Support for LCN lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lcn/scene.py b/homeassistant/components/lcn/scene.py index f1980b6475d..fe8040bc291 100644 --- a/homeassistant/components/lcn/scene.py +++ b/homeassistant/components/lcn/scene.py @@ -1,4 +1,5 @@ """Support for LCN scenes.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lcn/sensor.py b/homeassistant/components/lcn/sensor.py index 1428019b59f..38f76e8d2d1 100644 --- a/homeassistant/components/lcn/sensor.py +++ b/homeassistant/components/lcn/sensor.py @@ -1,4 +1,5 @@ """Support for LCN sensors.""" + from __future__ import annotations from itertools import chain diff --git a/homeassistant/components/lcn/switch.py b/homeassistant/components/lcn/switch.py index 8374ff85ab7..05e8d8d3937 100644 --- a/homeassistant/components/lcn/switch.py +++ b/homeassistant/components/lcn/switch.py @@ -1,4 +1,5 @@ """Support for LCN switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/ld2410_ble/config_flow.py b/homeassistant/components/ld2410_ble/config_flow.py index b0286b299a3..10d282cb8c7 100644 --- a/homeassistant/components/ld2410_ble/config_flow.py +++ b/homeassistant/components/ld2410_ble/config_flow.py @@ -1,4 +1,5 @@ """Config flow for LD2410BLE integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/ld2410_ble/models.py b/homeassistant/components/ld2410_ble/models.py index e2666277495..a7f5f4f2e3e 100644 --- a/homeassistant/components/ld2410_ble/models.py +++ b/homeassistant/components/ld2410_ble/models.py @@ -1,4 +1,5 @@ """The ld2410 ble integration models.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/leaone/__init__.py b/homeassistant/components/leaone/__init__.py index 9f8bac34d55..74dfa872ce2 100644 --- a/homeassistant/components/leaone/__init__.py +++ b/homeassistant/components/leaone/__init__.py @@ -1,4 +1,5 @@ """The Leaone integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/leaone/config_flow.py b/homeassistant/components/leaone/config_flow.py index fba9f103446..8878f9af065 100644 --- a/homeassistant/components/leaone/config_flow.py +++ b/homeassistant/components/leaone/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Leaone integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/leaone/device.py b/homeassistant/components/leaone/device.py index a745873b693..0b95783dfd7 100644 --- a/homeassistant/components/leaone/device.py +++ b/homeassistant/components/leaone/device.py @@ -1,4 +1,5 @@ """Support for Leaone devices.""" + from __future__ import annotations from leaone_ble import DeviceKey diff --git a/homeassistant/components/leaone/sensor.py b/homeassistant/components/leaone/sensor.py index a614e63231a..c57f6678897 100644 --- a/homeassistant/components/leaone/sensor.py +++ b/homeassistant/components/leaone/sensor.py @@ -1,4 +1,5 @@ """Support for Leaone sensors.""" + from __future__ import annotations from leaone_ble import DeviceClass as LeaoneSensorDeviceClass, SensorUpdate, Units diff --git a/homeassistant/components/led_ble/__init__.py b/homeassistant/components/led_ble/__init__.py index 27a273ed7b0..d09f88b145a 100644 --- a/homeassistant/components/led_ble/__init__.py +++ b/homeassistant/components/led_ble/__init__.py @@ -1,4 +1,5 @@ """The LED BLE integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/led_ble/config_flow.py b/homeassistant/components/led_ble/config_flow.py index 70b4f78e840..a5afbcc6c0d 100644 --- a/homeassistant/components/led_ble/config_flow.py +++ b/homeassistant/components/led_ble/config_flow.py @@ -1,4 +1,5 @@ """Config flow for LEDBLE integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/led_ble/light.py b/homeassistant/components/led_ble/light.py index a1da82dfe6d..3bca7269eba 100644 --- a/homeassistant/components/led_ble/light.py +++ b/homeassistant/components/led_ble/light.py @@ -1,4 +1,5 @@ """LED BLE integration light platform.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/led_ble/models.py b/homeassistant/components/led_ble/models.py index 0eda9439f11..a8dd3443dce 100644 --- a/homeassistant/components/led_ble/models.py +++ b/homeassistant/components/led_ble/models.py @@ -1,4 +1,5 @@ """The led ble integration models.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/lg_netcast/media_player.py b/homeassistant/components/lg_netcast/media_player.py index 2b59e628705..81927710299 100644 --- a/homeassistant/components/lg_netcast/media_player.py +++ b/homeassistant/components/lg_netcast/media_player.py @@ -1,4 +1,5 @@ """Support for LG TV running on NetCast 3 or 4.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/lg_soundbar/media_player.py b/homeassistant/components/lg_soundbar/media_player.py index cfd0ebbd7a7..962f67f714d 100644 --- a/homeassistant/components/lg_soundbar/media_player.py +++ b/homeassistant/components/lg_soundbar/media_player.py @@ -1,4 +1,5 @@ """Support for LG soundbars.""" + from __future__ import annotations import temescal diff --git a/homeassistant/components/lidarr/__init__.py b/homeassistant/components/lidarr/__init__.py index dd63920b209..acfb8f30f30 100644 --- a/homeassistant/components/lidarr/__init__.py +++ b/homeassistant/components/lidarr/__init__.py @@ -1,4 +1,5 @@ """The Lidarr component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lidarr/config_flow.py b/homeassistant/components/lidarr/config_flow.py index b1b04f6e778..379a01375b6 100644 --- a/homeassistant/components/lidarr/config_flow.py +++ b/homeassistant/components/lidarr/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Lidarr.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/lidarr/coordinator.py b/homeassistant/components/lidarr/coordinator.py index 9cc606a12b3..8b3116055d4 100644 --- a/homeassistant/components/lidarr/coordinator.py +++ b/homeassistant/components/lidarr/coordinator.py @@ -1,4 +1,5 @@ """Data update coordinator for the Lidarr integration.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/lidarr/sensor.py b/homeassistant/components/lidarr/sensor.py index 82717210dc2..9a3dee1a802 100644 --- a/homeassistant/components/lidarr/sensor.py +++ b/homeassistant/components/lidarr/sensor.py @@ -1,4 +1,5 @@ """Support for Lidarr.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/lifx/__init__.py b/homeassistant/components/lifx/__init__.py index 76d4b7e36c5..47f00959bcd 100644 --- a/homeassistant/components/lifx/__init__.py +++ b/homeassistant/components/lifx/__init__.py @@ -1,4 +1,5 @@ """Support for LIFX.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lifx/binary_sensor.py b/homeassistant/components/lifx/binary_sensor.py index 5719c881d1f..454561a6f4e 100644 --- a/homeassistant/components/lifx/binary_sensor.py +++ b/homeassistant/components/lifx/binary_sensor.py @@ -1,4 +1,5 @@ """Binary sensor entities for LIFX integration.""" + from __future__ import annotations from homeassistant.components.binary_sensor import ( diff --git a/homeassistant/components/lifx/button.py b/homeassistant/components/lifx/button.py index 86e3bc569b1..694c91b4c27 100644 --- a/homeassistant/components/lifx/button.py +++ b/homeassistant/components/lifx/button.py @@ -1,4 +1,5 @@ """Button entity for LIFX devices..""" + from __future__ import annotations from homeassistant.components.button import ( diff --git a/homeassistant/components/lifx/config_flow.py b/homeassistant/components/lifx/config_flow.py index dc0a0ab2d36..e4db80bec73 100644 --- a/homeassistant/components/lifx/config_flow.py +++ b/homeassistant/components/lifx/config_flow.py @@ -1,4 +1,5 @@ """Config flow flow LIFX.""" + from __future__ import annotations import socket diff --git a/homeassistant/components/lifx/coordinator.py b/homeassistant/components/lifx/coordinator.py index 18a8a24cb94..2b15b65255f 100644 --- a/homeassistant/components/lifx/coordinator.py +++ b/homeassistant/components/lifx/coordinator.py @@ -1,4 +1,5 @@ """Coordinator for lifx.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lifx/diagnostics.py b/homeassistant/components/lifx/diagnostics.py index abe13cd1a50..b9ef1af4dc6 100644 --- a/homeassistant/components/lifx/diagnostics.py +++ b/homeassistant/components/lifx/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for LIFX.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lifx/discovery.py b/homeassistant/components/lifx/discovery.py index a4072ee23ef..81c2d44de87 100644 --- a/homeassistant/components/lifx/discovery.py +++ b/homeassistant/components/lifx/discovery.py @@ -1,4 +1,5 @@ """The lifx integration discovery.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lifx/entity.py b/homeassistant/components/lifx/entity.py index 4bc6b87393d..279bcb86594 100644 --- a/homeassistant/components/lifx/entity.py +++ b/homeassistant/components/lifx/entity.py @@ -1,4 +1,5 @@ """Support for LIFX lights.""" + from __future__ import annotations from aiolifx import products diff --git a/homeassistant/components/lifx/light.py b/homeassistant/components/lifx/light.py index 74ed209742c..d1ee5c836eb 100644 --- a/homeassistant/components/lifx/light.py +++ b/homeassistant/components/lifx/light.py @@ -1,4 +1,5 @@ """Support for LIFX lights.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lifx/manager.py b/homeassistant/components/lifx/manager.py index 9e72ded620e..038fdceab26 100644 --- a/homeassistant/components/lifx/manager.py +++ b/homeassistant/components/lifx/manager.py @@ -1,4 +1,5 @@ """Support for LIFX lights.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lifx/migration.py b/homeassistant/components/lifx/migration.py index 359480a4507..9f8365cbceb 100644 --- a/homeassistant/components/lifx/migration.py +++ b/homeassistant/components/lifx/migration.py @@ -1,4 +1,5 @@ """Migrate lifx devices to their own config entry.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/lifx/select.py b/homeassistant/components/lifx/select.py index 183e31dec1f..ef2967d1776 100644 --- a/homeassistant/components/lifx/select.py +++ b/homeassistant/components/lifx/select.py @@ -1,4 +1,5 @@ """Select sensor entities for LIFX integration.""" + from __future__ import annotations from aiolifx_themes.themes import ThemeLibrary diff --git a/homeassistant/components/lifx/sensor.py b/homeassistant/components/lifx/sensor.py index e10f9579bc3..2f54317f9bd 100644 --- a/homeassistant/components/lifx/sensor.py +++ b/homeassistant/components/lifx/sensor.py @@ -1,4 +1,5 @@ """Sensors for LIFX lights.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/lifx_cloud/scene.py b/homeassistant/components/lifx_cloud/scene.py index 61656741f82..8e7ab0c2d46 100644 --- a/homeassistant/components/lifx_cloud/scene.py +++ b/homeassistant/components/lifx_cloud/scene.py @@ -1,4 +1,5 @@ """Support for LIFX Cloud scenes.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/light/__init__.py b/homeassistant/components/light/__init__.py index 93a3b23f504..0a41ca2a84e 100644 --- a/homeassistant/components/light/__init__.py +++ b/homeassistant/components/light/__init__.py @@ -1,4 +1,5 @@ """Provides functionality to interact with lights.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/light/device_action.py b/homeassistant/components/light/device_action.py index 2b49c963438..50dbf42b677 100644 --- a/homeassistant/components/light/device_action.py +++ b/homeassistant/components/light/device_action.py @@ -1,4 +1,5 @@ """Provides device actions for lights.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/light/device_condition.py b/homeassistant/components/light/device_condition.py index 12e86c1e23d..f9bb7c30bd7 100644 --- a/homeassistant/components/light/device_condition.py +++ b/homeassistant/components/light/device_condition.py @@ -1,4 +1,5 @@ """Provides device conditions for lights.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/light/device_trigger.py b/homeassistant/components/light/device_trigger.py index 5ae5b12bf61..033ea75357e 100644 --- a/homeassistant/components/light/device_trigger.py +++ b/homeassistant/components/light/device_trigger.py @@ -1,4 +1,5 @@ """Provides device trigger for lights.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/light/intent.py b/homeassistant/components/light/intent.py index 605434af916..53127babee9 100644 --- a/homeassistant/components/light/intent.py +++ b/homeassistant/components/light/intent.py @@ -1,4 +1,5 @@ """Intents for the light integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/light/reproduce_state.py b/homeassistant/components/light/reproduce_state.py index 54fcd01843c..4024f2f84ba 100644 --- a/homeassistant/components/light/reproduce_state.py +++ b/homeassistant/components/light/reproduce_state.py @@ -1,4 +1,5 @@ """Reproduce an Light state.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/light/significant_change.py b/homeassistant/components/light/significant_change.py index dc8f711b579..1877c925622 100644 --- a/homeassistant/components/light/significant_change.py +++ b/homeassistant/components/light/significant_change.py @@ -1,4 +1,5 @@ """Helper to test significant Light state changes.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lightwave/climate.py b/homeassistant/components/lightwave/climate.py index 5e89e4f8145..1016e8ce80d 100644 --- a/homeassistant/components/lightwave/climate.py +++ b/homeassistant/components/lightwave/climate.py @@ -1,4 +1,5 @@ """Support for LightwaveRF TRVs.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lightwave/light.py b/homeassistant/components/lightwave/light.py index f89dbb6bf5f..fb007b321ab 100644 --- a/homeassistant/components/lightwave/light.py +++ b/homeassistant/components/lightwave/light.py @@ -1,4 +1,5 @@ """Support for LightwaveRF lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lightwave/sensor.py b/homeassistant/components/lightwave/sensor.py index dac591aea34..721c508dd99 100644 --- a/homeassistant/components/lightwave/sensor.py +++ b/homeassistant/components/lightwave/sensor.py @@ -1,4 +1,5 @@ """Support for LightwaveRF TRV - Associated Battery.""" + from __future__ import annotations from homeassistant.components.sensor import ( diff --git a/homeassistant/components/lightwave/switch.py b/homeassistant/components/lightwave/switch.py index 67b69d0e5c4..ca146ca881c 100644 --- a/homeassistant/components/lightwave/switch.py +++ b/homeassistant/components/lightwave/switch.py @@ -1,4 +1,5 @@ """Support for LightwaveRF switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/limitlessled/light.py b/homeassistant/components/limitlessled/light.py index 926e0a8a6d6..0b666b59faa 100644 --- a/homeassistant/components/limitlessled/light.py +++ b/homeassistant/components/limitlessled/light.py @@ -1,4 +1,5 @@ """Support for LimitlessLED bulbs.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/linear_garage_door/__init__.py b/homeassistant/components/linear_garage_door/__init__.py index d168da511e0..e21d8eaba58 100644 --- a/homeassistant/components/linear_garage_door/__init__.py +++ b/homeassistant/components/linear_garage_door/__init__.py @@ -1,4 +1,5 @@ """The Linear Garage Door integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/linear_garage_door/config_flow.py b/homeassistant/components/linear_garage_door/config_flow.py index c8892a8f99c..bfb6f825030 100644 --- a/homeassistant/components/linear_garage_door/config_flow.py +++ b/homeassistant/components/linear_garage_door/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Linear Garage Door integration.""" + from __future__ import annotations from collections.abc import Collection, Mapping, Sequence diff --git a/homeassistant/components/linear_garage_door/coordinator.py b/homeassistant/components/linear_garage_door/coordinator.py index e9234327429..b771b552b62 100644 --- a/homeassistant/components/linear_garage_door/coordinator.py +++ b/homeassistant/components/linear_garage_door/coordinator.py @@ -1,4 +1,5 @@ """DataUpdateCoordinator for Linear.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/linear_garage_door/diagnostics.py b/homeassistant/components/linear_garage_door/diagnostics.py index fffcdd7de87..fc4906daa77 100644 --- a/homeassistant/components/linear_garage_door/diagnostics.py +++ b/homeassistant/components/linear_garage_door/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Linear Garage Door.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/linksys_smart/device_tracker.py b/homeassistant/components/linksys_smart/device_tracker.py index d0440c832c8..a33f0070c70 100644 --- a/homeassistant/components/linksys_smart/device_tracker.py +++ b/homeassistant/components/linksys_smart/device_tracker.py @@ -1,4 +1,5 @@ """Support for Linksys Smart Wifi routers.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/linode/__init__.py b/homeassistant/components/linode/__init__.py index bd61519edc4..2ed3cf244d0 100644 --- a/homeassistant/components/linode/__init__.py +++ b/homeassistant/components/linode/__init__.py @@ -1,4 +1,5 @@ """Support for Linode.""" + from datetime import timedelta import logging diff --git a/homeassistant/components/linode/binary_sensor.py b/homeassistant/components/linode/binary_sensor.py index 17a68e9be9c..02c7a1ef383 100644 --- a/homeassistant/components/linode/binary_sensor.py +++ b/homeassistant/components/linode/binary_sensor.py @@ -1,4 +1,5 @@ """Support for monitoring the state of Linode Nodes.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/linode/switch.py b/homeassistant/components/linode/switch.py index b59e8f901e5..f2665671c0b 100644 --- a/homeassistant/components/linode/switch.py +++ b/homeassistant/components/linode/switch.py @@ -1,4 +1,5 @@ """Support for interacting with Linode nodes.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/linux_battery/sensor.py b/homeassistant/components/linux_battery/sensor.py index 08b2dc33bae..9dc0e8c675d 100644 --- a/homeassistant/components/linux_battery/sensor.py +++ b/homeassistant/components/linux_battery/sensor.py @@ -1,4 +1,5 @@ """Details about the built-in battery.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/litejet/config_flow.py b/homeassistant/components/litejet/config_flow.py index 3c452f7b4d7..19ddf0122c4 100644 --- a/homeassistant/components/litejet/config_flow.py +++ b/homeassistant/components/litejet/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the LiteJet lighting system.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/litejet/const.py b/homeassistant/components/litejet/const.py index baeadd7f4a9..69492efd0c7 100644 --- a/homeassistant/components/litejet/const.py +++ b/homeassistant/components/litejet/const.py @@ -1,4 +1,5 @@ """LiteJet constants.""" + from homeassistant.const import Platform DOMAIN = "litejet" diff --git a/homeassistant/components/litejet/diagnostics.py b/homeassistant/components/litejet/diagnostics.py index 48f38542dfd..7a10f4d6754 100644 --- a/homeassistant/components/litejet/diagnostics.py +++ b/homeassistant/components/litejet/diagnostics.py @@ -1,4 +1,5 @@ """Support for LiteJet diagnostics.""" + from typing import Any from pylitejet import LiteJet diff --git a/homeassistant/components/litejet/light.py b/homeassistant/components/litejet/light.py index 167f7a62a00..b387c6f8890 100644 --- a/homeassistant/components/litejet/light.py +++ b/homeassistant/components/litejet/light.py @@ -1,4 +1,5 @@ """Support for LiteJet lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/litejet/switch.py b/homeassistant/components/litejet/switch.py index 5089b9ec0f9..cf294be8054 100644 --- a/homeassistant/components/litejet/switch.py +++ b/homeassistant/components/litejet/switch.py @@ -1,4 +1,5 @@ """Support for LiteJet switch.""" + from typing import Any from pylitejet import LiteJet, LiteJetError diff --git a/homeassistant/components/litejet/trigger.py b/homeassistant/components/litejet/trigger.py index df5ffac9b99..2786cc8b76a 100644 --- a/homeassistant/components/litejet/trigger.py +++ b/homeassistant/components/litejet/trigger.py @@ -1,4 +1,5 @@ """Trigger an automation when a LiteJet switch is released.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/litterrobot/__init__.py b/homeassistant/components/litterrobot/__init__.py index daf71fe8a6e..ec9849bbb89 100644 --- a/homeassistant/components/litterrobot/__init__.py +++ b/homeassistant/components/litterrobot/__init__.py @@ -1,4 +1,5 @@ """The Litter-Robot integration.""" + from __future__ import annotations from pylitterbot import FeederRobot, LitterRobot, LitterRobot3, LitterRobot4, Robot diff --git a/homeassistant/components/litterrobot/binary_sensor.py b/homeassistant/components/litterrobot/binary_sensor.py index 22e8bda8dfa..2f44f44ed53 100644 --- a/homeassistant/components/litterrobot/binary_sensor.py +++ b/homeassistant/components/litterrobot/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Litter-Robot binary sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/litterrobot/button.py b/homeassistant/components/litterrobot/button.py index 79a866333d8..02477e7fa03 100644 --- a/homeassistant/components/litterrobot/button.py +++ b/homeassistant/components/litterrobot/button.py @@ -1,4 +1,5 @@ """Support for Litter-Robot button.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/litterrobot/config_flow.py b/homeassistant/components/litterrobot/config_flow.py index 54377d43980..39a1646a8b7 100644 --- a/homeassistant/components/litterrobot/config_flow.py +++ b/homeassistant/components/litterrobot/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Litter-Robot integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/litterrobot/entity.py b/homeassistant/components/litterrobot/entity.py index fb1fbe58a7b..4639404b92b 100644 --- a/homeassistant/components/litterrobot/entity.py +++ b/homeassistant/components/litterrobot/entity.py @@ -1,4 +1,5 @@ """Litter-Robot entities for common data and methods.""" + from __future__ import annotations from typing import Generic, TypeVar diff --git a/homeassistant/components/litterrobot/hub.py b/homeassistant/components/litterrobot/hub.py index 5dc8098a8df..4af004bddf5 100644 --- a/homeassistant/components/litterrobot/hub.py +++ b/homeassistant/components/litterrobot/hub.py @@ -1,4 +1,5 @@ """A wrapper 'hub' for the Litter-Robot API.""" + from __future__ import annotations from collections.abc import Generator, Mapping diff --git a/homeassistant/components/litterrobot/select.py b/homeassistant/components/litterrobot/select.py index 8b5445269bd..e7ecbada10d 100644 --- a/homeassistant/components/litterrobot/select.py +++ b/homeassistant/components/litterrobot/select.py @@ -1,4 +1,5 @@ """Support for Litter-Robot selects.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/litterrobot/sensor.py b/homeassistant/components/litterrobot/sensor.py index a25921e440c..1b4b7f78fdc 100644 --- a/homeassistant/components/litterrobot/sensor.py +++ b/homeassistant/components/litterrobot/sensor.py @@ -1,4 +1,5 @@ """Support for Litter-Robot sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/litterrobot/switch.py b/homeassistant/components/litterrobot/switch.py index aa4a18c1840..60ca9b4d6c7 100644 --- a/homeassistant/components/litterrobot/switch.py +++ b/homeassistant/components/litterrobot/switch.py @@ -1,4 +1,5 @@ """Support for Litter-Robot switches.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/litterrobot/time.py b/homeassistant/components/litterrobot/time.py index bb840e17a8f..4e5e80a8ca6 100644 --- a/homeassistant/components/litterrobot/time.py +++ b/homeassistant/components/litterrobot/time.py @@ -1,4 +1,5 @@ """Support for Litter-Robot time.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/litterrobot/update.py b/homeassistant/components/litterrobot/update.py index 584a6af77c2..c4d1ada6080 100644 --- a/homeassistant/components/litterrobot/update.py +++ b/homeassistant/components/litterrobot/update.py @@ -1,4 +1,5 @@ """Support for Litter-Robot updates.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/litterrobot/vacuum.py b/homeassistant/components/litterrobot/vacuum.py index 681af81481d..4f9efa2dff7 100644 --- a/homeassistant/components/litterrobot/vacuum.py +++ b/homeassistant/components/litterrobot/vacuum.py @@ -1,4 +1,5 @@ """Support for Litter-Robot "Vacuum".""" + from __future__ import annotations from datetime import time diff --git a/homeassistant/components/livisi/__init__.py b/homeassistant/components/livisi/__init__.py index e638c84a917..26e36e68efa 100644 --- a/homeassistant/components/livisi/__init__.py +++ b/homeassistant/components/livisi/__init__.py @@ -1,4 +1,5 @@ """The Livisi Smart Home integration.""" + from __future__ import annotations from typing import Final diff --git a/homeassistant/components/livisi/binary_sensor.py b/homeassistant/components/livisi/binary_sensor.py index 42170bbeb4c..d4edd59f2d7 100644 --- a/homeassistant/components/livisi/binary_sensor.py +++ b/homeassistant/components/livisi/binary_sensor.py @@ -1,4 +1,5 @@ """Code to handle a Livisi Binary Sensor.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/livisi/climate.py b/homeassistant/components/livisi/climate.py index 6990dabff1d..56fe63d351f 100644 --- a/homeassistant/components/livisi/climate.py +++ b/homeassistant/components/livisi/climate.py @@ -1,4 +1,5 @@ """Code to handle a Livisi Virtual Climate Control.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/livisi/config_flow.py b/homeassistant/components/livisi/config_flow.py index 1b5c4892eee..7317aec0abc 100644 --- a/homeassistant/components/livisi/config_flow.py +++ b/homeassistant/components/livisi/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Livisi Home Assistant.""" + from __future__ import annotations from contextlib import suppress diff --git a/homeassistant/components/livisi/coordinator.py b/homeassistant/components/livisi/coordinator.py index 17a3b1828d0..7cb5757310f 100644 --- a/homeassistant/components/livisi/coordinator.py +++ b/homeassistant/components/livisi/coordinator.py @@ -1,4 +1,5 @@ """Code to manage fetching LIVISI data API.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/livisi/entity.py b/homeassistant/components/livisi/entity.py index f76901ddb05..3160b8f288a 100644 --- a/homeassistant/components/livisi/entity.py +++ b/homeassistant/components/livisi/entity.py @@ -1,4 +1,5 @@ """Code to handle a Livisi switches.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/livisi/switch.py b/homeassistant/components/livisi/switch.py index 2c5a2b5137b..fa604c5fc87 100644 --- a/homeassistant/components/livisi/switch.py +++ b/homeassistant/components/livisi/switch.py @@ -1,4 +1,5 @@ """Code to handle a Livisi switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/llamalab_automate/notify.py b/homeassistant/components/llamalab_automate/notify.py index 8361d65725c..6ce00db71c3 100644 --- a/homeassistant/components/llamalab_automate/notify.py +++ b/homeassistant/components/llamalab_automate/notify.py @@ -1,4 +1,5 @@ """LlamaLab Automate notification service.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/local_calendar/__init__.py b/homeassistant/components/local_calendar/__init__.py index 3b302742ab6..2be5133a21c 100644 --- a/homeassistant/components/local_calendar/__init__.py +++ b/homeassistant/components/local_calendar/__init__.py @@ -1,4 +1,5 @@ """The Local Calendar integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/local_calendar/config_flow.py b/homeassistant/components/local_calendar/config_flow.py index 8703def7304..8caa3a5d528 100644 --- a/homeassistant/components/local_calendar/config_flow.py +++ b/homeassistant/components/local_calendar/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Local Calendar integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/local_file/camera.py b/homeassistant/components/local_file/camera.py index 5b29516e03d..72fe1a88b86 100644 --- a/homeassistant/components/local_file/camera.py +++ b/homeassistant/components/local_file/camera.py @@ -1,4 +1,5 @@ """Camera that loads a picture from a local file.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/local_ip/__init__.py b/homeassistant/components/local_ip/__init__.py index b5ed762ef5d..45ddbed7150 100644 --- a/homeassistant/components/local_ip/__init__.py +++ b/homeassistant/components/local_ip/__init__.py @@ -1,4 +1,5 @@ """Get the local IP address of the Home Assistant instance.""" + from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv diff --git a/homeassistant/components/local_ip/config_flow.py b/homeassistant/components/local_ip/config_flow.py index 09e9835e65e..3a4612d84aa 100644 --- a/homeassistant/components/local_ip/config_flow.py +++ b/homeassistant/components/local_ip/config_flow.py @@ -1,4 +1,5 @@ """Config flow for local_ip.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/local_ip/const.py b/homeassistant/components/local_ip/const.py index b079ec87663..38390cbfdc1 100644 --- a/homeassistant/components/local_ip/const.py +++ b/homeassistant/components/local_ip/const.py @@ -1,4 +1,5 @@ """Local IP constants.""" + from homeassistant.const import Platform DOMAIN = "local_ip" diff --git a/homeassistant/components/local_todo/__init__.py b/homeassistant/components/local_todo/__init__.py index f8403251ba0..8245822bd9f 100644 --- a/homeassistant/components/local_todo/__init__.py +++ b/homeassistant/components/local_todo/__init__.py @@ -1,4 +1,5 @@ """The Local To-do integration.""" + from __future__ import annotations from pathlib import Path diff --git a/homeassistant/components/local_todo/config_flow.py b/homeassistant/components/local_todo/config_flow.py index dc596c91d9c..a79a62c647b 100644 --- a/homeassistant/components/local_todo/config_flow.py +++ b/homeassistant/components/local_todo/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Local To-do integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/locative/__init__.py b/homeassistant/components/locative/__init__.py index cca322f3baa..c27b6b4153b 100644 --- a/homeassistant/components/locative/__init__.py +++ b/homeassistant/components/locative/__init__.py @@ -1,4 +1,5 @@ """Support for Locative.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/locative/config_flow.py b/homeassistant/components/locative/config_flow.py index a1ac8263416..2aaa2e65f1c 100644 --- a/homeassistant/components/locative/config_flow.py +++ b/homeassistant/components/locative/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Locative.""" + from homeassistant.helpers import config_entry_flow from .const import DOMAIN diff --git a/homeassistant/components/locative/device_tracker.py b/homeassistant/components/locative/device_tracker.py index 2ec1e7437de..e8135bbd03c 100644 --- a/homeassistant/components/locative/device_tracker.py +++ b/homeassistant/components/locative/device_tracker.py @@ -1,4 +1,5 @@ """Support for the Locative platform.""" + from homeassistant.components.device_tracker import SourceType, TrackerEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback diff --git a/homeassistant/components/lock/__init__.py b/homeassistant/components/lock/__init__.py index a4e7c4b7d1a..f17c81aed20 100644 --- a/homeassistant/components/lock/__init__.py +++ b/homeassistant/components/lock/__init__.py @@ -1,4 +1,5 @@ """Component to interface with locks that can be controlled remotely.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/lock/device_action.py b/homeassistant/components/lock/device_action.py index fba95a932de..a75966414f8 100644 --- a/homeassistant/components/lock/device_action.py +++ b/homeassistant/components/lock/device_action.py @@ -1,4 +1,5 @@ """Provides device automations for Lock.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/lock/device_condition.py b/homeassistant/components/lock/device_condition.py index 5ba93554aec..327bde2c0e3 100644 --- a/homeassistant/components/lock/device_condition.py +++ b/homeassistant/components/lock/device_condition.py @@ -1,4 +1,5 @@ """Provides device automations for Lock.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/lock/device_trigger.py b/homeassistant/components/lock/device_trigger.py index c6b86eaca4a..57a83c7dc7a 100644 --- a/homeassistant/components/lock/device_trigger.py +++ b/homeassistant/components/lock/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for Lock.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/lock/reproduce_state.py b/homeassistant/components/lock/reproduce_state.py index b6eefcfac63..36afcf5f310 100644 --- a/homeassistant/components/lock/reproduce_state.py +++ b/homeassistant/components/lock/reproduce_state.py @@ -1,4 +1,5 @@ """Reproduce an Lock state.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lock/significant_change.py b/homeassistant/components/lock/significant_change.py index 172bf2559c5..138f2393257 100644 --- a/homeassistant/components/lock/significant_change.py +++ b/homeassistant/components/lock/significant_change.py @@ -1,4 +1,5 @@ """Helper to test significant Lock state changes.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/logbook/__init__.py b/homeassistant/components/logbook/__init__.py index 891d1fb3fb0..f19e64aa6f0 100644 --- a/homeassistant/components/logbook/__init__.py +++ b/homeassistant/components/logbook/__init__.py @@ -1,4 +1,5 @@ """Event parser and human readable log generator.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/logbook/const.py b/homeassistant/components/logbook/const.py index 3d4c0b3615f..282580bdc95 100644 --- a/homeassistant/components/logbook/const.py +++ b/homeassistant/components/logbook/const.py @@ -1,4 +1,5 @@ """Event parser and human readable log generator.""" + from __future__ import annotations from homeassistant.components.automation import EVENT_AUTOMATION_TRIGGERED diff --git a/homeassistant/components/logbook/helpers.py b/homeassistant/components/logbook/helpers.py index 68fa5794618..698d7d56aa1 100644 --- a/homeassistant/components/logbook/helpers.py +++ b/homeassistant/components/logbook/helpers.py @@ -1,4 +1,5 @@ """Event parser and human readable log generator.""" + from __future__ import annotations from collections.abc import Callable, Mapping diff --git a/homeassistant/components/logbook/models.py b/homeassistant/components/logbook/models.py index 22420f243c6..7cbafd43d53 100644 --- a/homeassistant/components/logbook/models.py +++ b/homeassistant/components/logbook/models.py @@ -1,4 +1,5 @@ """Event parser and human readable log generator.""" + from __future__ import annotations from collections.abc import Callable, Mapping diff --git a/homeassistant/components/logbook/processor.py b/homeassistant/components/logbook/processor.py index 02a6dae3ce6..29e135fbf62 100644 --- a/homeassistant/components/logbook/processor.py +++ b/homeassistant/components/logbook/processor.py @@ -1,4 +1,5 @@ """Event parser and human readable log generator.""" + from __future__ import annotations from collections.abc import Callable, Generator, Sequence diff --git a/homeassistant/components/logbook/queries/__init__.py b/homeassistant/components/logbook/queries/__init__.py index af41374ec9b..c27da37742b 100644 --- a/homeassistant/components/logbook/queries/__init__.py +++ b/homeassistant/components/logbook/queries/__init__.py @@ -1,4 +1,5 @@ """Queries for logbook.""" + from __future__ import annotations from collections.abc import Collection diff --git a/homeassistant/components/logbook/queries/all.py b/homeassistant/components/logbook/queries/all.py index 21f88135a1d..cd596414583 100644 --- a/homeassistant/components/logbook/queries/all.py +++ b/homeassistant/components/logbook/queries/all.py @@ -1,4 +1,5 @@ """All queries for logbook.""" + from __future__ import annotations from sqlalchemy import lambda_stmt diff --git a/homeassistant/components/logbook/queries/common.py b/homeassistant/components/logbook/queries/common.py index cbbe8724ece..8f9ab8a80cd 100644 --- a/homeassistant/components/logbook/queries/common.py +++ b/homeassistant/components/logbook/queries/common.py @@ -1,4 +1,5 @@ """Queries for logbook.""" + from __future__ import annotations from typing import Final diff --git a/homeassistant/components/logbook/queries/devices.py b/homeassistant/components/logbook/queries/devices.py index 75604de6104..f4b1c06c40c 100644 --- a/homeassistant/components/logbook/queries/devices.py +++ b/homeassistant/components/logbook/queries/devices.py @@ -1,4 +1,5 @@ """Devices queries for logbook.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/logbook/queries/entities.py b/homeassistant/components/logbook/queries/entities.py index 95c1d565263..494c2965215 100644 --- a/homeassistant/components/logbook/queries/entities.py +++ b/homeassistant/components/logbook/queries/entities.py @@ -1,4 +1,5 @@ """Entities queries for logbook.""" + from __future__ import annotations from collections.abc import Collection, Iterable diff --git a/homeassistant/components/logbook/queries/entities_and_devices.py b/homeassistant/components/logbook/queries/entities_and_devices.py index c465a343d61..383bb71e223 100644 --- a/homeassistant/components/logbook/queries/entities_and_devices.py +++ b/homeassistant/components/logbook/queries/entities_and_devices.py @@ -1,4 +1,5 @@ """Entities and Devices queries for logbook.""" + from __future__ import annotations from collections.abc import Collection, Iterable diff --git a/homeassistant/components/logbook/rest_api.py b/homeassistant/components/logbook/rest_api.py index 5ffd057670f..5f1918ebccf 100644 --- a/homeassistant/components/logbook/rest_api.py +++ b/homeassistant/components/logbook/rest_api.py @@ -1,4 +1,5 @@ """Event parser and human readable log generator.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/logbook/websocket_api.py b/homeassistant/components/logbook/websocket_api.py index 0b1b34ca375..4e4732c0d0e 100644 --- a/homeassistant/components/logbook/websocket_api.py +++ b/homeassistant/components/logbook/websocket_api.py @@ -1,4 +1,5 @@ """Event parser and human readable log generator.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/logger/__init__.py b/homeassistant/components/logger/__init__.py index 32b864047a6..be6e8c1b24e 100644 --- a/homeassistant/components/logger/__init__.py +++ b/homeassistant/components/logger/__init__.py @@ -1,4 +1,5 @@ """Support for setting the level of logging for components.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/logger/helpers.py b/homeassistant/components/logger/helpers.py index bf37ab3625b..a527a081fca 100644 --- a/homeassistant/components/logger/helpers.py +++ b/homeassistant/components/logger/helpers.py @@ -1,4 +1,5 @@ """Helpers for the logger integration.""" + from __future__ import annotations from collections import defaultdict diff --git a/homeassistant/components/logger/websocket_api.py b/homeassistant/components/logger/websocket_api.py index 240db3144af..fafc2d3eedb 100644 --- a/homeassistant/components/logger/websocket_api.py +++ b/homeassistant/components/logger/websocket_api.py @@ -1,4 +1,5 @@ """Websocket API handlers for the logger integration.""" + from typing import Any import voluptuous as vol diff --git a/homeassistant/components/logi_circle/camera.py b/homeassistant/components/logi_circle/camera.py index d1ea01e864c..ad31713d734 100644 --- a/homeassistant/components/logi_circle/camera.py +++ b/homeassistant/components/logi_circle/camera.py @@ -1,4 +1,5 @@ """Support to the Logi Circle cameras.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/logi_circle/const.py b/homeassistant/components/logi_circle/const.py index 3e74611f767..e144f47ce4e 100644 --- a/homeassistant/components/logi_circle/const.py +++ b/homeassistant/components/logi_circle/const.py @@ -1,4 +1,5 @@ """Constants in Logi Circle component.""" + from __future__ import annotations DOMAIN = "logi_circle" diff --git a/homeassistant/components/logi_circle/sensor.py b/homeassistant/components/logi_circle/sensor.py index d06569a19ca..121cb8848ae 100644 --- a/homeassistant/components/logi_circle/sensor.py +++ b/homeassistant/components/logi_circle/sensor.py @@ -1,4 +1,5 @@ """Support for Logi Circle sensors.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/london_air/sensor.py b/homeassistant/components/london_air/sensor.py index 98cc4c4b4e8..39debb5ba4c 100644 --- a/homeassistant/components/london_air/sensor.py +++ b/homeassistant/components/london_air/sensor.py @@ -1,4 +1,5 @@ """Sensor for checking the status of London air.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/london_underground/const.py b/homeassistant/components/london_underground/const.py index 4928d3bb164..532f4333ba9 100644 --- a/homeassistant/components/london_underground/const.py +++ b/homeassistant/components/london_underground/const.py @@ -1,4 +1,5 @@ """Constants for the London underground integration.""" + from datetime import timedelta DOMAIN = "london_underground" diff --git a/homeassistant/components/london_underground/coordinator.py b/homeassistant/components/london_underground/coordinator.py index 2d3fd6b970f..cf14ad14b43 100644 --- a/homeassistant/components/london_underground/coordinator.py +++ b/homeassistant/components/london_underground/coordinator.py @@ -1,4 +1,5 @@ """DataUpdateCoordinator for London underground integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/london_underground/sensor.py b/homeassistant/components/london_underground/sensor.py index 3f5ec42521e..03bdc1c395f 100644 --- a/homeassistant/components/london_underground/sensor.py +++ b/homeassistant/components/london_underground/sensor.py @@ -1,4 +1,5 @@ """Sensor for checking the status of London Underground tube lines.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lookin/__init__.py b/homeassistant/components/lookin/__init__.py index 358ccc5ae37..a0e529bc189 100644 --- a/homeassistant/components/lookin/__init__.py +++ b/homeassistant/components/lookin/__init__.py @@ -1,4 +1,5 @@ """The lookin integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lookin/climate.py b/homeassistant/components/lookin/climate.py index 1bee2d14295..fadeb6d16fa 100644 --- a/homeassistant/components/lookin/climate.py +++ b/homeassistant/components/lookin/climate.py @@ -1,4 +1,5 @@ """The lookin integration climate platform.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lookin/config_flow.py b/homeassistant/components/lookin/config_flow.py index 27ba96e9eb0..61dfd9a2c20 100644 --- a/homeassistant/components/lookin/config_flow.py +++ b/homeassistant/components/lookin/config_flow.py @@ -1,4 +1,5 @@ """The lookin integration config_flow.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lookin/const.py b/homeassistant/components/lookin/const.py index 8eb96dcefd8..d4624932ad9 100644 --- a/homeassistant/components/lookin/const.py +++ b/homeassistant/components/lookin/const.py @@ -1,4 +1,5 @@ """The lookin integration constants.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/lookin/coordinator.py b/homeassistant/components/lookin/coordinator.py index d556899a914..925a7416731 100644 --- a/homeassistant/components/lookin/coordinator.py +++ b/homeassistant/components/lookin/coordinator.py @@ -1,4 +1,5 @@ """Coordinator for lookin devices.""" + from __future__ import annotations from collections.abc import Awaitable, Callable diff --git a/homeassistant/components/lookin/entity.py b/homeassistant/components/lookin/entity.py index 0e518ffc1e5..fd36301ddb6 100644 --- a/homeassistant/components/lookin/entity.py +++ b/homeassistant/components/lookin/entity.py @@ -1,4 +1,5 @@ """The lookin integration entity.""" + from __future__ import annotations from abc import abstractmethod diff --git a/homeassistant/components/lookin/light.py b/homeassistant/components/lookin/light.py index c4b263cbad1..804d0ebef01 100644 --- a/homeassistant/components/lookin/light.py +++ b/homeassistant/components/lookin/light.py @@ -1,4 +1,5 @@ """The lookin integration light platform.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lookin/media_player.py b/homeassistant/components/lookin/media_player.py index f7ae457cbff..b3dda9c9e0c 100644 --- a/homeassistant/components/lookin/media_player.py +++ b/homeassistant/components/lookin/media_player.py @@ -1,4 +1,5 @@ """The lookin integration light platform.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lookin/models.py b/homeassistant/components/lookin/models.py index 2de3a7ee761..3bf6ae9d862 100644 --- a/homeassistant/components/lookin/models.py +++ b/homeassistant/components/lookin/models.py @@ -1,4 +1,5 @@ """The lookin integration models.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/lookin/sensor.py b/homeassistant/components/lookin/sensor.py index 822c28fda30..cae4f7782a8 100644 --- a/homeassistant/components/lookin/sensor.py +++ b/homeassistant/components/lookin/sensor.py @@ -1,4 +1,5 @@ """The lookin integration sensor platform.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/loqed/__init__.py b/homeassistant/components/loqed/__init__.py index e22987ba426..b6408880c96 100644 --- a/homeassistant/components/loqed/__init__.py +++ b/homeassistant/components/loqed/__init__.py @@ -1,4 +1,5 @@ """The loqed integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/loqed/config_flow.py b/homeassistant/components/loqed/config_flow.py index a0f23b4359d..8c82a7a6964 100644 --- a/homeassistant/components/loqed/config_flow.py +++ b/homeassistant/components/loqed/config_flow.py @@ -1,4 +1,5 @@ """Config flow for loqed integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/loqed/entity.py b/homeassistant/components/loqed/entity.py index aec50ec8f92..9a443e23924 100644 --- a/homeassistant/components/loqed/entity.py +++ b/homeassistant/components/loqed/entity.py @@ -1,4 +1,5 @@ """Base entity for the LOQED integration.""" + from __future__ import annotations from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, DeviceInfo diff --git a/homeassistant/components/loqed/lock.py b/homeassistant/components/loqed/lock.py index d34df19e2d1..be6b39176d6 100644 --- a/homeassistant/components/loqed/lock.py +++ b/homeassistant/components/loqed/lock.py @@ -1,4 +1,5 @@ """LOQED lock integration for Home Assistant.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/loqed/sensor.py b/homeassistant/components/loqed/sensor.py index ee4fa7ecd74..1d4595db8e9 100644 --- a/homeassistant/components/loqed/sensor.py +++ b/homeassistant/components/loqed/sensor.py @@ -1,4 +1,5 @@ """Creates LOQED sensors.""" + from typing import Final from homeassistant.components.sensor import ( diff --git a/homeassistant/components/lovelace/const.py b/homeassistant/components/lovelace/const.py index 01110bb8a7c..0f1e818e8bd 100644 --- a/homeassistant/components/lovelace/const.py +++ b/homeassistant/components/lovelace/const.py @@ -1,4 +1,5 @@ """Constants for Lovelace.""" + from typing import Any import voluptuous as vol diff --git a/homeassistant/components/lovelace/dashboard.py b/homeassistant/components/lovelace/dashboard.py index d935ad9bff5..984c0d14734 100644 --- a/homeassistant/components/lovelace/dashboard.py +++ b/homeassistant/components/lovelace/dashboard.py @@ -1,4 +1,5 @@ """Lovelace dashboard support.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/lovelace/resources.py b/homeassistant/components/lovelace/resources.py index b6d0c939fec..2dbbbacabea 100644 --- a/homeassistant/components/lovelace/resources.py +++ b/homeassistant/components/lovelace/resources.py @@ -1,4 +1,5 @@ """Lovelace resources support.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lovelace/websocket.py b/homeassistant/components/lovelace/websocket.py index b756c2765e1..e4eaa42073f 100644 --- a/homeassistant/components/lovelace/websocket.py +++ b/homeassistant/components/lovelace/websocket.py @@ -1,4 +1,5 @@ """Websocket API for Lovelace.""" + from __future__ import annotations from functools import wraps diff --git a/homeassistant/components/luci/device_tracker.py b/homeassistant/components/luci/device_tracker.py index f4ebe4376f3..528596d53c5 100644 --- a/homeassistant/components/luci/device_tracker.py +++ b/homeassistant/components/luci/device_tracker.py @@ -1,4 +1,5 @@ """Support for OpenWRT (luci) routers.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/luftdaten/__init__.py b/homeassistant/components/luftdaten/__init__.py index d842fdc1a89..2ef7864566f 100644 --- a/homeassistant/components/luftdaten/__init__.py +++ b/homeassistant/components/luftdaten/__init__.py @@ -3,6 +3,7 @@ Sensor.Community was previously called Luftdaten, hence the domain differs from the integration name. """ + from __future__ import annotations import logging diff --git a/homeassistant/components/luftdaten/config_flow.py b/homeassistant/components/luftdaten/config_flow.py index f2f8a9366cd..ba14afeb092 100644 --- a/homeassistant/components/luftdaten/config_flow.py +++ b/homeassistant/components/luftdaten/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the Sensor.Community integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/luftdaten/const.py b/homeassistant/components/luftdaten/const.py index b64079933cd..bc6970455c8 100644 --- a/homeassistant/components/luftdaten/const.py +++ b/homeassistant/components/luftdaten/const.py @@ -1,4 +1,5 @@ """Define constants for the Sensor.Community integration.""" + from datetime import timedelta ATTR_SENSOR_ID = "sensor_id" diff --git a/homeassistant/components/luftdaten/diagnostics.py b/homeassistant/components/luftdaten/diagnostics.py index 8146d8eb7d6..a1bbcbcadd7 100644 --- a/homeassistant/components/luftdaten/diagnostics.py +++ b/homeassistant/components/luftdaten/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Sensor.Community.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/luftdaten/sensor.py b/homeassistant/components/luftdaten/sensor.py index 58fa5788bda..8b9def63fda 100644 --- a/homeassistant/components/luftdaten/sensor.py +++ b/homeassistant/components/luftdaten/sensor.py @@ -1,4 +1,5 @@ """Support for Sensor.Community sensors.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/lupusec/__init__.py b/homeassistant/components/lupusec/__init__.py index f937c7edd10..c471902813a 100644 --- a/homeassistant/components/lupusec/__init__.py +++ b/homeassistant/components/lupusec/__init__.py @@ -1,4 +1,5 @@ """Support for Lupusec Home Security system.""" + from json import JSONDecodeError import logging diff --git a/homeassistant/components/lupusec/alarm_control_panel.py b/homeassistant/components/lupusec/alarm_control_panel.py index a13e3684294..090d9ab3ced 100644 --- a/homeassistant/components/lupusec/alarm_control_panel.py +++ b/homeassistant/components/lupusec/alarm_control_panel.py @@ -1,4 +1,5 @@ """Support for Lupusec System alarm control panels.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/lupusec/binary_sensor.py b/homeassistant/components/lupusec/binary_sensor.py index 5cf63579984..e046d356327 100644 --- a/homeassistant/components/lupusec/binary_sensor.py +++ b/homeassistant/components/lupusec/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Lupusec Security System binary sensors.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/lupusec/switch.py b/homeassistant/components/lupusec/switch.py index e07c974f033..3fa62235b9a 100644 --- a/homeassistant/components/lupusec/switch.py +++ b/homeassistant/components/lupusec/switch.py @@ -1,4 +1,5 @@ """Support for Lupusec Security System switches.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/lutron/__init__.py b/homeassistant/components/lutron/__init__.py index ad69a14c0f5..517eb4c8350 100644 --- a/homeassistant/components/lutron/__init__.py +++ b/homeassistant/components/lutron/__init__.py @@ -1,4 +1,5 @@ """Component for interacting with a Lutron RadioRA 2 system.""" + from dataclasses import dataclass import logging diff --git a/homeassistant/components/lutron/binary_sensor.py b/homeassistant/components/lutron/binary_sensor.py index 8cae9c9714a..c33b545413d 100644 --- a/homeassistant/components/lutron/binary_sensor.py +++ b/homeassistant/components/lutron/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Lutron Powr Savr occupancy sensors.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/lutron/config_flow.py b/homeassistant/components/lutron/config_flow.py index 1a21ab37469..8fd11484a72 100644 --- a/homeassistant/components/lutron/config_flow.py +++ b/homeassistant/components/lutron/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the Lutron integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lutron/cover.py b/homeassistant/components/lutron/cover.py index cdcdf93ccbd..247ead3ccec 100644 --- a/homeassistant/components/lutron/cover.py +++ b/homeassistant/components/lutron/cover.py @@ -1,4 +1,5 @@ """Support for Lutron shades.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/lutron/fan.py b/homeassistant/components/lutron/fan.py index 4aac95759aa..07e0bb444b2 100644 --- a/homeassistant/components/lutron/fan.py +++ b/homeassistant/components/lutron/fan.py @@ -1,4 +1,5 @@ """Lutron fan platform.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lutron/light.py b/homeassistant/components/lutron/light.py index 0bd00177cc1..103bcb1e39d 100644 --- a/homeassistant/components/lutron/light.py +++ b/homeassistant/components/lutron/light.py @@ -1,4 +1,5 @@ """Support for Lutron lights.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/lutron/scene.py b/homeassistant/components/lutron/scene.py index 9485eddf78b..b66ca08a587 100644 --- a/homeassistant/components/lutron/scene.py +++ b/homeassistant/components/lutron/scene.py @@ -1,4 +1,5 @@ """Support for Lutron scenes.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lutron/switch.py b/homeassistant/components/lutron/switch.py index 37aa26f6313..9ffce0aa530 100644 --- a/homeassistant/components/lutron/switch.py +++ b/homeassistant/components/lutron/switch.py @@ -1,4 +1,5 @@ """Support for Lutron switches.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/lutron_caseta/__init__.py b/homeassistant/components/lutron_caseta/__init__.py index 0dceada821e..f6fed0688c4 100644 --- a/homeassistant/components/lutron_caseta/__init__.py +++ b/homeassistant/components/lutron_caseta/__init__.py @@ -1,4 +1,5 @@ """Component for interacting with a Lutron Caseta system.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lutron_caseta/binary_sensor.py b/homeassistant/components/lutron_caseta/binary_sensor.py index da7d6106796..73d468a88f2 100644 --- a/homeassistant/components/lutron_caseta/binary_sensor.py +++ b/homeassistant/components/lutron_caseta/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Lutron Caseta Occupancy/Vacancy Sensors.""" + from pylutron_caseta import OCCUPANCY_GROUP_OCCUPIED from homeassistant.components.binary_sensor import ( diff --git a/homeassistant/components/lutron_caseta/button.py b/homeassistant/components/lutron_caseta/button.py index d31e4579675..a1ed43a8b03 100644 --- a/homeassistant/components/lutron_caseta/button.py +++ b/homeassistant/components/lutron_caseta/button.py @@ -1,4 +1,5 @@ """Support for pico and keypad buttons.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lutron_caseta/config_flow.py b/homeassistant/components/lutron_caseta/config_flow.py index 7323acc3e4c..d7b47aebc7e 100644 --- a/homeassistant/components/lutron_caseta/config_flow.py +++ b/homeassistant/components/lutron_caseta/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Lutron Caseta.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lutron_caseta/device_trigger.py b/homeassistant/components/lutron_caseta/device_trigger.py index 7e178698afe..fd5d2ad222d 100644 --- a/homeassistant/components/lutron_caseta/device_trigger.py +++ b/homeassistant/components/lutron_caseta/device_trigger.py @@ -1,4 +1,5 @@ """Provides device triggers for lutron caseta.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lutron_caseta/diagnostics.py b/homeassistant/components/lutron_caseta/diagnostics.py index 07bd0a9e8ce..61a24d21b4e 100644 --- a/homeassistant/components/lutron_caseta/diagnostics.py +++ b/homeassistant/components/lutron_caseta/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for lutron_caseta.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lutron_caseta/fan.py b/homeassistant/components/lutron_caseta/fan.py index ba69f17d880..1577cf52727 100644 --- a/homeassistant/components/lutron_caseta/fan.py +++ b/homeassistant/components/lutron_caseta/fan.py @@ -1,4 +1,5 @@ """Support for Lutron Caseta fans.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/lutron_caseta/light.py b/homeassistant/components/lutron_caseta/light.py index eb3e38b2e39..44c4c63e094 100644 --- a/homeassistant/components/lutron_caseta/light.py +++ b/homeassistant/components/lutron_caseta/light.py @@ -1,4 +1,5 @@ """Support for Lutron Caseta lights.""" + from datetime import timedelta from typing import Any diff --git a/homeassistant/components/lutron_caseta/logbook.py b/homeassistant/components/lutron_caseta/logbook.py index ec612ded375..5b5d2c0f9f1 100644 --- a/homeassistant/components/lutron_caseta/logbook.py +++ b/homeassistant/components/lutron_caseta/logbook.py @@ -1,4 +1,5 @@ """Describe lutron_caseta logbook events.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/lutron_caseta/models.py b/homeassistant/components/lutron_caseta/models.py index 91b042106cb..d5ccbecbd61 100644 --- a/homeassistant/components/lutron_caseta/models.py +++ b/homeassistant/components/lutron_caseta/models.py @@ -1,4 +1,5 @@ """The lutron_caseta integration models.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/lutron_caseta/scene.py b/homeassistant/components/lutron_caseta/scene.py index 520dcd965f2..f4aebdafe9b 100644 --- a/homeassistant/components/lutron_caseta/scene.py +++ b/homeassistant/components/lutron_caseta/scene.py @@ -1,4 +1,5 @@ """Support for Lutron Caseta scenes.""" + from typing import Any from pylutron_caseta.smartbridge import Smartbridge diff --git a/homeassistant/components/lutron_caseta/util.py b/homeassistant/components/lutron_caseta/util.py index dfcf7a32228..07b5b502fd0 100644 --- a/homeassistant/components/lutron_caseta/util.py +++ b/homeassistant/components/lutron_caseta/util.py @@ -1,4 +1,5 @@ """Support for Lutron Caseta.""" + from __future__ import annotations diff --git a/homeassistant/components/lw12wifi/light.py b/homeassistant/components/lw12wifi/light.py index 9f520a79ae1..272fcd4a8a1 100644 --- a/homeassistant/components/lw12wifi/light.py +++ b/homeassistant/components/lw12wifi/light.py @@ -1,4 +1,5 @@ """Support for Lagute LW-12 WiFi LED Controller.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/lyric/__init__.py b/homeassistant/components/lyric/__init__.py index d048b31d0b0..e2c85c1400b 100644 --- a/homeassistant/components/lyric/__init__.py +++ b/homeassistant/components/lyric/__init__.py @@ -1,4 +1,5 @@ """The Honeywell Lyric integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lyric/api.py b/homeassistant/components/lyric/api.py index 171e010137a..c9a424bf8ab 100644 --- a/homeassistant/components/lyric/api.py +++ b/homeassistant/components/lyric/api.py @@ -1,4 +1,5 @@ """API for Honeywell Lyric bound to Home Assistant OAuth.""" + from typing import cast from aiohttp import BasicAuth, ClientSession diff --git a/homeassistant/components/lyric/climate.py b/homeassistant/components/lyric/climate.py index ecf9b50474d..3bba2f677b0 100644 --- a/homeassistant/components/lyric/climate.py +++ b/homeassistant/components/lyric/climate.py @@ -1,4 +1,5 @@ """Support for Honeywell Lyric climate platform.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/lyric/config_flow.py b/homeassistant/components/lyric/config_flow.py index 16c5c40cbea..db4647145fe 100644 --- a/homeassistant/components/lyric/config_flow.py +++ b/homeassistant/components/lyric/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Honeywell Lyric.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/lyric/const.py b/homeassistant/components/lyric/const.py index 4f2f72b937b..6d973b56181 100644 --- a/homeassistant/components/lyric/const.py +++ b/homeassistant/components/lyric/const.py @@ -1,4 +1,5 @@ """Constants for the Honeywell Lyric integration.""" + from aiohttp.client_exceptions import ClientResponseError from aiolyric.exceptions import LyricAuthenticationException, LyricException diff --git a/homeassistant/components/lyric/sensor.py b/homeassistant/components/lyric/sensor.py index 4e2339368f0..858c6c25bd4 100644 --- a/homeassistant/components/lyric/sensor.py +++ b/homeassistant/components/lyric/sensor.py @@ -1,4 +1,5 @@ """Support for Honeywell Lyric sensor platform.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mailbox/__init__.py b/homeassistant/components/mailbox/__init__.py index 1becc15624e..ef9a36ca20c 100644 --- a/homeassistant/components/mailbox/__init__.py +++ b/homeassistant/components/mailbox/__init__.py @@ -1,4 +1,5 @@ """Support for Voice mailboxes.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mailgun/config_flow.py b/homeassistant/components/mailgun/config_flow.py index bfeaed5ae5b..3af12460e5e 100644 --- a/homeassistant/components/mailgun/config_flow.py +++ b/homeassistant/components/mailgun/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Mailgun.""" + from homeassistant.helpers import config_entry_flow from .const import DOMAIN diff --git a/homeassistant/components/mailgun/notify.py b/homeassistant/components/mailgun/notify.py index b7104d4a0f1..ed5b3a69135 100644 --- a/homeassistant/components/mailgun/notify.py +++ b/homeassistant/components/mailgun/notify.py @@ -1,4 +1,5 @@ """Support for the Mailgun mail notifications.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/manual/alarm_control_panel.py b/homeassistant/components/manual/alarm_control_panel.py index 099275a98a1..6f4a3306c29 100644 --- a/homeassistant/components/manual/alarm_control_panel.py +++ b/homeassistant/components/manual/alarm_control_panel.py @@ -1,4 +1,5 @@ """Support for manual alarms.""" + from __future__ import annotations import datetime diff --git a/homeassistant/components/manual_mqtt/alarm_control_panel.py b/homeassistant/components/manual_mqtt/alarm_control_panel.py index d1442a4e9ed..9da0ff97838 100644 --- a/homeassistant/components/manual_mqtt/alarm_control_panel.py +++ b/homeassistant/components/manual_mqtt/alarm_control_panel.py @@ -1,4 +1,5 @@ """Support for manual alarms controllable via MQTT.""" + from __future__ import annotations import datetime diff --git a/homeassistant/components/map/__init__.py b/homeassistant/components/map/__init__.py index a3ba65be7db..a78199ad660 100644 --- a/homeassistant/components/map/__init__.py +++ b/homeassistant/components/map/__init__.py @@ -1,4 +1,5 @@ """Support for showing device locations.""" + from homeassistant.components import frontend from homeassistant.core import HomeAssistant from homeassistant.helpers import config_validation as cv diff --git a/homeassistant/components/marytts/tts.py b/homeassistant/components/marytts/tts.py index 56f31d81d97..168d735a987 100644 --- a/homeassistant/components/marytts/tts.py +++ b/homeassistant/components/marytts/tts.py @@ -1,4 +1,5 @@ """Support for the MaryTTS service.""" + from __future__ import annotations from speak2mary import MaryTTS diff --git a/homeassistant/components/mastodon/notify.py b/homeassistant/components/mastodon/notify.py index 8f259bc3433..97ab2145486 100644 --- a/homeassistant/components/mastodon/notify.py +++ b/homeassistant/components/mastodon/notify.py @@ -1,4 +1,5 @@ """Mastodon platform for notify component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/matrix/__init__.py b/homeassistant/components/matrix/__init__.py index e91ee4d270c..5c7d66b7a0b 100644 --- a/homeassistant/components/matrix/__init__.py +++ b/homeassistant/components/matrix/__init__.py @@ -1,4 +1,5 @@ """The Matrix bot component.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/matrix/notify.py b/homeassistant/components/matrix/notify.py index c71f91eb582..0c8430afacd 100644 --- a/homeassistant/components/matrix/notify.py +++ b/homeassistant/components/matrix/notify.py @@ -1,4 +1,5 @@ """Support for Matrix notifications.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/matter/adapter.py b/homeassistant/components/matter/adapter.py index 6d7d437a206..e6185de17a6 100644 --- a/homeassistant/components/matter/adapter.py +++ b/homeassistant/components/matter/adapter.py @@ -1,4 +1,5 @@ """Matter to Home Assistant adapter.""" + from __future__ import annotations from typing import TYPE_CHECKING, cast diff --git a/homeassistant/components/matter/addon.py b/homeassistant/components/matter/addon.py index 84f430a58d8..a463685a073 100644 --- a/homeassistant/components/matter/addon.py +++ b/homeassistant/components/matter/addon.py @@ -1,4 +1,5 @@ """Provide add-on management.""" + from __future__ import annotations from homeassistant.components.hassio import AddonManager diff --git a/homeassistant/components/matter/api.py b/homeassistant/components/matter/api.py index 21445e469aa..94980617c0d 100644 --- a/homeassistant/components/matter/api.py +++ b/homeassistant/components/matter/api.py @@ -1,4 +1,5 @@ """Handle websocket api for Matter.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/matter/binary_sensor.py b/homeassistant/components/matter/binary_sensor.py index ea87fabf3f5..23ac2195355 100644 --- a/homeassistant/components/matter/binary_sensor.py +++ b/homeassistant/components/matter/binary_sensor.py @@ -1,4 +1,5 @@ """Matter binary sensors.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/matter/climate.py b/homeassistant/components/matter/climate.py index 8769fc430d8..5ae1f7ca486 100644 --- a/homeassistant/components/matter/climate.py +++ b/homeassistant/components/matter/climate.py @@ -1,4 +1,5 @@ """Matter climate platform.""" + from __future__ import annotations from enum import IntEnum diff --git a/homeassistant/components/matter/config_flow.py b/homeassistant/components/matter/config_flow.py index 8982067207e..7dc06807a98 100644 --- a/homeassistant/components/matter/config_flow.py +++ b/homeassistant/components/matter/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Matter integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/matter/cover.py b/homeassistant/components/matter/cover.py index 590f325cf22..ea5250c9bd3 100644 --- a/homeassistant/components/matter/cover.py +++ b/homeassistant/components/matter/cover.py @@ -1,4 +1,5 @@ """Matter cover.""" + from __future__ import annotations from enum import IntEnum diff --git a/homeassistant/components/matter/diagnostics.py b/homeassistant/components/matter/diagnostics.py index d875f37dcae..23b6854c791 100644 --- a/homeassistant/components/matter/diagnostics.py +++ b/homeassistant/components/matter/diagnostics.py @@ -1,4 +1,5 @@ """Provide diagnostics for Matter.""" + from __future__ import annotations from copy import deepcopy diff --git a/homeassistant/components/matter/discovery.py b/homeassistant/components/matter/discovery.py index e1d004a15c8..985ac1c996e 100644 --- a/homeassistant/components/matter/discovery.py +++ b/homeassistant/components/matter/discovery.py @@ -1,4 +1,5 @@ """Map Matter Nodes and Attributes to Home Assistant entities.""" + from __future__ import annotations from collections.abc import Generator diff --git a/homeassistant/components/matter/entity.py b/homeassistant/components/matter/entity.py index 5c3f65d903c..dcb3586934b 100644 --- a/homeassistant/components/matter/entity.py +++ b/homeassistant/components/matter/entity.py @@ -1,4 +1,5 @@ """Matter entity base class.""" + from __future__ import annotations from abc import abstractmethod diff --git a/homeassistant/components/matter/event.py b/homeassistant/components/matter/event.py index e84fcec32d8..1b55b700085 100644 --- a/homeassistant/components/matter/event.py +++ b/homeassistant/components/matter/event.py @@ -1,4 +1,5 @@ """Matter event entities from Node events.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/matter/helpers.py b/homeassistant/components/matter/helpers.py index 8f7f3d81883..9aa58879214 100644 --- a/homeassistant/components/matter/helpers.py +++ b/homeassistant/components/matter/helpers.py @@ -1,4 +1,5 @@ """Provide integration helpers that are aware of the matter integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/matter/light.py b/homeassistant/components/matter/light.py index aa93cef9916..fce780896a4 100644 --- a/homeassistant/components/matter/light.py +++ b/homeassistant/components/matter/light.py @@ -1,4 +1,5 @@ """Matter light.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/matter/lock.py b/homeassistant/components/matter/lock.py index dd29638f765..e5067efd482 100644 --- a/homeassistant/components/matter/lock.py +++ b/homeassistant/components/matter/lock.py @@ -1,4 +1,5 @@ """Matter lock.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/matter/models.py b/homeassistant/components/matter/models.py index 5f47f73b139..18e503523ae 100644 --- a/homeassistant/components/matter/models.py +++ b/homeassistant/components/matter/models.py @@ -1,4 +1,5 @@ """Models used for the Matter integration.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/matter/sensor.py b/homeassistant/components/matter/sensor.py index 90a9cb3fcc8..6f1bd1d142b 100644 --- a/homeassistant/components/matter/sensor.py +++ b/homeassistant/components/matter/sensor.py @@ -1,4 +1,5 @@ """Matter sensors.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/matter/switch.py b/homeassistant/components/matter/switch.py index 61922e8e8c9..91a28bdab8c 100644 --- a/homeassistant/components/matter/switch.py +++ b/homeassistant/components/matter/switch.py @@ -1,4 +1,5 @@ """Matter switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/matter/util.py b/homeassistant/components/matter/util.py index 834c71a0307..0df2230ab96 100644 --- a/homeassistant/components/matter/util.py +++ b/homeassistant/components/matter/util.py @@ -1,4 +1,5 @@ """Provide integration utilities.""" + from __future__ import annotations XY_COLOR_FACTOR = 65536 diff --git a/homeassistant/components/maxcube/binary_sensor.py b/homeassistant/components/maxcube/binary_sensor.py index 6dcfcf8dca4..208b93eb19a 100644 --- a/homeassistant/components/maxcube/binary_sensor.py +++ b/homeassistant/components/maxcube/binary_sensor.py @@ -1,4 +1,5 @@ """Support for MAX! binary sensors via MAX! Cube.""" + from __future__ import annotations from homeassistant.components.binary_sensor import ( diff --git a/homeassistant/components/maxcube/climate.py b/homeassistant/components/maxcube/climate.py index 42abed48724..1b7dc6b901d 100644 --- a/homeassistant/components/maxcube/climate.py +++ b/homeassistant/components/maxcube/climate.py @@ -1,4 +1,5 @@ """Support for MAX! Thermostats via MAX! Cube.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mazda/__init__.py b/homeassistant/components/mazda/__init__.py index 75e7baf7413..fd323060ac0 100644 --- a/homeassistant/components/mazda/__init__.py +++ b/homeassistant/components/mazda/__init__.py @@ -1,4 +1,5 @@ """The Mazda Connected Services integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry, ConfigEntryState diff --git a/homeassistant/components/meater/config_flow.py b/homeassistant/components/meater/config_flow.py index d325bcd4e5a..0f2bb35755f 100644 --- a/homeassistant/components/meater/config_flow.py +++ b/homeassistant/components/meater/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Meater.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/meater/sensor.py b/homeassistant/components/meater/sensor.py index a7e03ae7c22..30a10531fad 100644 --- a/homeassistant/components/meater/sensor.py +++ b/homeassistant/components/meater/sensor.py @@ -1,4 +1,5 @@ """The Meater Temperature Probe integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/medcom_ble/__init__.py b/homeassistant/components/medcom_ble/__init__.py index a129c4fc7f9..36357746b95 100644 --- a/homeassistant/components/medcom_ble/__init__.py +++ b/homeassistant/components/medcom_ble/__init__.py @@ -1,4 +1,5 @@ """The Medcom BLE integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/medcom_ble/sensor.py b/homeassistant/components/medcom_ble/sensor.py index 74c78a3cf9e..b5cb29be845 100644 --- a/homeassistant/components/medcom_ble/sensor.py +++ b/homeassistant/components/medcom_ble/sensor.py @@ -1,4 +1,5 @@ """Support for Medcom BLE radiation monitor sensors.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/media_extractor/__init__.py b/homeassistant/components/media_extractor/__init__.py index b657caceaff..f6b153b2ef8 100644 --- a/homeassistant/components/media_extractor/__init__.py +++ b/homeassistant/components/media_extractor/__init__.py @@ -1,4 +1,5 @@ """Decorator service for the media_player.play_media service.""" + from collections.abc import Callable import logging from pathlib import Path diff --git a/homeassistant/components/media_player/__init__.py b/homeassistant/components/media_player/__init__.py index ffb1d6d4a32..4bb026ffc0d 100644 --- a/homeassistant/components/media_player/__init__.py +++ b/homeassistant/components/media_player/__init__.py @@ -1,4 +1,5 @@ """Component to interface with various media players.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/media_player/browse_media.py b/homeassistant/components/media_player/browse_media.py index 1e9be742c53..351d4e9140f 100644 --- a/homeassistant/components/media_player/browse_media.py +++ b/homeassistant/components/media_player/browse_media.py @@ -1,4 +1,5 @@ """Browse media features for media player.""" + from __future__ import annotations from collections.abc import Sequence diff --git a/homeassistant/components/media_player/const.py b/homeassistant/components/media_player/const.py index 2c609750153..9b69ee62846 100644 --- a/homeassistant/components/media_player/const.py +++ b/homeassistant/components/media_player/const.py @@ -1,4 +1,5 @@ """Provides the constants needed for component.""" + from enum import IntFlag, StrEnum # How long our auth signature on the content should be valid for diff --git a/homeassistant/components/media_player/device_condition.py b/homeassistant/components/media_player/device_condition.py index 5efee0c0b49..660f53bc8d5 100644 --- a/homeassistant/components/media_player/device_condition.py +++ b/homeassistant/components/media_player/device_condition.py @@ -1,4 +1,5 @@ """Provides device automations for Media player.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/media_player/device_trigger.py b/homeassistant/components/media_player/device_trigger.py index e626059841c..9d1a3fab37e 100644 --- a/homeassistant/components/media_player/device_trigger.py +++ b/homeassistant/components/media_player/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for Media player.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/media_player/errors.py b/homeassistant/components/media_player/errors.py index 2e8443c2794..5888ba6b5b0 100644 --- a/homeassistant/components/media_player/errors.py +++ b/homeassistant/components/media_player/errors.py @@ -1,4 +1,5 @@ """Errors for the Media Player component.""" + from homeassistant.exceptions import HomeAssistantError diff --git a/homeassistant/components/media_player/reproduce_state.py b/homeassistant/components/media_player/reproduce_state.py index 387792a1b60..a40575a9dba 100644 --- a/homeassistant/components/media_player/reproduce_state.py +++ b/homeassistant/components/media_player/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/media_player/significant_change.py b/homeassistant/components/media_player/significant_change.py index 43a253d9220..ea5cf9d1b27 100644 --- a/homeassistant/components/media_player/significant_change.py +++ b/homeassistant/components/media_player/significant_change.py @@ -1,4 +1,5 @@ """Helper to test significant Media Player state changes.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/media_source/__init__.py b/homeassistant/components/media_source/__init__.py index fdb7fa5f1f2..2f996523fdc 100644 --- a/homeassistant/components/media_source/__init__.py +++ b/homeassistant/components/media_source/__init__.py @@ -1,4 +1,5 @@ """The media_source integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/media_source/error.py b/homeassistant/components/media_source/error.py index 00f3ced5d8d..120e7583e23 100644 --- a/homeassistant/components/media_source/error.py +++ b/homeassistant/components/media_source/error.py @@ -1,4 +1,5 @@ """Errors for media source.""" + from homeassistant.exceptions import HomeAssistantError diff --git a/homeassistant/components/media_source/local_source.py b/homeassistant/components/media_source/local_source.py index ac6623a3af8..8d739d8d027 100644 --- a/homeassistant/components/media_source/local_source.py +++ b/homeassistant/components/media_source/local_source.py @@ -1,4 +1,5 @@ """Local Media Source Implementation.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/media_source/models.py b/homeassistant/components/media_source/models.py index cbe71447a3f..482ed0e855f 100644 --- a/homeassistant/components/media_source/models.py +++ b/homeassistant/components/media_source/models.py @@ -1,4 +1,5 @@ """Media Source models.""" + from __future__ import annotations from abc import ABC diff --git a/homeassistant/components/mediaroom/media_player.py b/homeassistant/components/mediaroom/media_player.py index 4dc6d677abb..22417adcf51 100644 --- a/homeassistant/components/mediaroom/media_player.py +++ b/homeassistant/components/mediaroom/media_player.py @@ -1,4 +1,5 @@ """Support for the Mediaroom Set-up-box.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/melcloud/__init__.py b/homeassistant/components/melcloud/__init__.py index 2db3e79dfe9..30645661ff1 100644 --- a/homeassistant/components/melcloud/__init__.py +++ b/homeassistant/components/melcloud/__init__.py @@ -1,4 +1,5 @@ """The MELCloud Climate integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/melcloud/climate.py b/homeassistant/components/melcloud/climate.py index ed37ff76b76..4bf12650b82 100644 --- a/homeassistant/components/melcloud/climate.py +++ b/homeassistant/components/melcloud/climate.py @@ -1,4 +1,5 @@ """Platform for climate integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/melcloud/config_flow.py b/homeassistant/components/melcloud/config_flow.py index f848846409d..f071b64988d 100644 --- a/homeassistant/components/melcloud/config_flow.py +++ b/homeassistant/components/melcloud/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the MELCloud platform.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/melcloud/sensor.py b/homeassistant/components/melcloud/sensor.py index c37c26e722e..73a72ba9dfb 100644 --- a/homeassistant/components/melcloud/sensor.py +++ b/homeassistant/components/melcloud/sensor.py @@ -1,4 +1,5 @@ """Support for MelCloud device sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/melcloud/water_heater.py b/homeassistant/components/melcloud/water_heater.py index 210b8bd51e2..7d170430b04 100644 --- a/homeassistant/components/melcloud/water_heater.py +++ b/homeassistant/components/melcloud/water_heater.py @@ -1,4 +1,5 @@ """Platform for water_heater integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/melissa/climate.py b/homeassistant/components/melissa/climate.py index f94c3af6d9a..af59046c58b 100644 --- a/homeassistant/components/melissa/climate.py +++ b/homeassistant/components/melissa/climate.py @@ -1,4 +1,5 @@ """Support for Melissa Climate A/C.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/melnor/sensor.py b/homeassistant/components/melnor/sensor.py index 255c3c9747d..8765cd538f8 100644 --- a/homeassistant/components/melnor/sensor.py +++ b/homeassistant/components/melnor/sensor.py @@ -1,4 +1,5 @@ """Sensor support for Melnor Bluetooth water timer.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/meraki/device_tracker.py b/homeassistant/components/meraki/device_tracker.py index 4149c5ac8ae..58da08d984c 100644 --- a/homeassistant/components/meraki/device_tracker.py +++ b/homeassistant/components/meraki/device_tracker.py @@ -1,4 +1,5 @@ """Support for the Meraki CMX location service.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/message_bird/notify.py b/homeassistant/components/message_bird/notify.py index 241646918c6..b1b7b373e6a 100644 --- a/homeassistant/components/message_bird/notify.py +++ b/homeassistant/components/message_bird/notify.py @@ -1,4 +1,5 @@ """MessageBird platform for notify component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/met/__init__.py b/homeassistant/components/met/__init__.py index a10a07b5374..ec402a16489 100644 --- a/homeassistant/components/met/__init__.py +++ b/homeassistant/components/met/__init__.py @@ -1,4 +1,5 @@ """The met component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/met/config_flow.py b/homeassistant/components/met/config_flow.py index 2afe6f8cd30..84a44682413 100644 --- a/homeassistant/components/met/config_flow.py +++ b/homeassistant/components/met/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure Met component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/met/const.py b/homeassistant/components/met/const.py index b690f1b6723..c513e98504e 100644 --- a/homeassistant/components/met/const.py +++ b/homeassistant/components/met/const.py @@ -1,4 +1,5 @@ """Constants for Met component.""" + from homeassistant.components.weather import ( ATTR_CONDITION_CLEAR_NIGHT, ATTR_CONDITION_CLOUDY, diff --git a/homeassistant/components/met/coordinator.py b/homeassistant/components/met/coordinator.py index 6354e286cee..e5a4dbf754c 100644 --- a/homeassistant/components/met/coordinator.py +++ b/homeassistant/components/met/coordinator.py @@ -1,4 +1,5 @@ """DataUpdateCoordinator for Met.no integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/met/weather.py b/homeassistant/components/met/weather.py index e4a63e326a6..86ef77f03f6 100644 --- a/homeassistant/components/met/weather.py +++ b/homeassistant/components/met/weather.py @@ -1,4 +1,5 @@ """Support for Met.no weather service.""" + from __future__ import annotations from types import MappingProxyType diff --git a/homeassistant/components/met_eireann/__init__.py b/homeassistant/components/met_eireann/__init__.py index 5edecbbac0b..92f2ffcfac6 100644 --- a/homeassistant/components/met_eireann/__init__.py +++ b/homeassistant/components/met_eireann/__init__.py @@ -1,4 +1,5 @@ """The met_eireann component.""" + from datetime import timedelta import logging from types import MappingProxyType diff --git a/homeassistant/components/met_eireann/config_flow.py b/homeassistant/components/met_eireann/config_flow.py index d1e49e4961e..422b46827da 100644 --- a/homeassistant/components/met_eireann/config_flow.py +++ b/homeassistant/components/met_eireann/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure Met Éireann component.""" + from typing import Any import voluptuous as vol diff --git a/homeassistant/components/met_eireann/const.py b/homeassistant/components/met_eireann/const.py index 9316aad1b17..3a4c3dda507 100644 --- a/homeassistant/components/met_eireann/const.py +++ b/homeassistant/components/met_eireann/const.py @@ -1,4 +1,5 @@ """Constants for Met Éireann component.""" + from homeassistant.components.weather import ( ATTR_CONDITION_CLEAR_NIGHT, ATTR_CONDITION_CLOUDY, diff --git a/homeassistant/components/meteo_france/__init__.py b/homeassistant/components/meteo_france/__init__.py index 3f1cd2a5e34..e43572ade6c 100644 --- a/homeassistant/components/meteo_france/__init__.py +++ b/homeassistant/components/meteo_france/__init__.py @@ -1,4 +1,5 @@ """Support for Meteo-France weather data.""" + from datetime import timedelta import logging diff --git a/homeassistant/components/meteo_france/config_flow.py b/homeassistant/components/meteo_france/config_flow.py index 695b0c9b353..37995534fb1 100644 --- a/homeassistant/components/meteo_france/config_flow.py +++ b/homeassistant/components/meteo_france/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the Meteo-France integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/meteo_france/const.py b/homeassistant/components/meteo_france/const.py index e950dfe1fa8..2230f43b754 100644 --- a/homeassistant/components/meteo_france/const.py +++ b/homeassistant/components/meteo_france/const.py @@ -1,4 +1,5 @@ """Meteo-France component constants.""" + from __future__ import annotations from homeassistant.components.weather import ( diff --git a/homeassistant/components/meteo_france/sensor.py b/homeassistant/components/meteo_france/sensor.py index c5ff38f2a87..2587c5d4337 100644 --- a/homeassistant/components/meteo_france/sensor.py +++ b/homeassistant/components/meteo_france/sensor.py @@ -1,4 +1,5 @@ """Support for Meteo-France raining forecast sensor.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/meteoalarm/binary_sensor.py b/homeassistant/components/meteoalarm/binary_sensor.py index 246074ce585..8b38ac6dbb3 100644 --- a/homeassistant/components/meteoalarm/binary_sensor.py +++ b/homeassistant/components/meteoalarm/binary_sensor.py @@ -1,4 +1,5 @@ """Binary Sensor for MeteoAlarm.eu.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/meteoclimatic/const.py b/homeassistant/components/meteoclimatic/const.py index 4a7276d4e42..3d8f93d014d 100644 --- a/homeassistant/components/meteoclimatic/const.py +++ b/homeassistant/components/meteoclimatic/const.py @@ -1,4 +1,5 @@ """Meteoclimatic component constants.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/meteoclimatic/sensor.py b/homeassistant/components/meteoclimatic/sensor.py index 9a54e766945..2194f82e43e 100644 --- a/homeassistant/components/meteoclimatic/sensor.py +++ b/homeassistant/components/meteoclimatic/sensor.py @@ -1,4 +1,5 @@ """Support for Meteoclimatic sensor.""" + from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, diff --git a/homeassistant/components/meteoclimatic/weather.py b/homeassistant/components/meteoclimatic/weather.py index f9b341cf114..75a93689efa 100644 --- a/homeassistant/components/meteoclimatic/weather.py +++ b/homeassistant/components/meteoclimatic/weather.py @@ -1,4 +1,5 @@ """Support for Meteoclimatic weather service.""" + from meteoclimatic import Condition from homeassistant.components.weather import WeatherEntity diff --git a/homeassistant/components/metoffice/__init__.py b/homeassistant/components/metoffice/__init__.py index a658de9a024..cdc6c2c7500 100644 --- a/homeassistant/components/metoffice/__init__.py +++ b/homeassistant/components/metoffice/__init__.py @@ -1,4 +1,5 @@ """The Met Office integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/metoffice/config_flow.py b/homeassistant/components/metoffice/config_flow.py index 0677ae5e44c..196d24ff68a 100644 --- a/homeassistant/components/metoffice/config_flow.py +++ b/homeassistant/components/metoffice/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Met Office integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/metoffice/const.py b/homeassistant/components/metoffice/const.py index 8b86784b70b..966aec7d381 100644 --- a/homeassistant/components/metoffice/const.py +++ b/homeassistant/components/metoffice/const.py @@ -1,4 +1,5 @@ """Constants for Met Office Integration.""" + from datetime import timedelta from homeassistant.components.weather import ( diff --git a/homeassistant/components/metoffice/data.py b/homeassistant/components/metoffice/data.py index c6bb2b4c01b..651e56c3adc 100644 --- a/homeassistant/components/metoffice/data.py +++ b/homeassistant/components/metoffice/data.py @@ -1,4 +1,5 @@ """Common Met Office Data class used by both sensor and entity.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/homeassistant/components/metoffice/helpers.py b/homeassistant/components/metoffice/helpers.py index 5b698bf19da..56d4d8f971b 100644 --- a/homeassistant/components/metoffice/helpers.py +++ b/homeassistant/components/metoffice/helpers.py @@ -1,4 +1,5 @@ """Helpers used for Met Office integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/metoffice/sensor.py b/homeassistant/components/metoffice/sensor.py index 84a51a0d584..61f825abdc3 100644 --- a/homeassistant/components/metoffice/sensor.py +++ b/homeassistant/components/metoffice/sensor.py @@ -1,4 +1,5 @@ """Support for UK Met Office weather service.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/metoffice/weather.py b/homeassistant/components/metoffice/weather.py index b6e35168276..ed4268d1722 100644 --- a/homeassistant/components/metoffice/weather.py +++ b/homeassistant/components/metoffice/weather.py @@ -1,4 +1,5 @@ """Support for UK Met Office weather service.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/mfi/sensor.py b/homeassistant/components/mfi/sensor.py index 84f4abdaead..afa5e00bf02 100644 --- a/homeassistant/components/mfi/sensor.py +++ b/homeassistant/components/mfi/sensor.py @@ -1,4 +1,5 @@ """Support for Ubiquiti mFi sensors.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mfi/switch.py b/homeassistant/components/mfi/switch.py index a25d0dfc87b..fe0aeb902ee 100644 --- a/homeassistant/components/mfi/switch.py +++ b/homeassistant/components/mfi/switch.py @@ -1,4 +1,5 @@ """Support for Ubiquiti mFi switches.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/microbees/button.py b/homeassistant/components/microbees/button.py index cf82a60bfa4..f449fa9afee 100644 --- a/homeassistant/components/microbees/button.py +++ b/homeassistant/components/microbees/button.py @@ -1,4 +1,5 @@ """Button integration microBees.""" + from typing import Any from homeassistant.components.button import ButtonEntity diff --git a/homeassistant/components/microbees/config_flow.py b/homeassistant/components/microbees/config_flow.py index 2eaed8dbafc..dedb6c1f374 100644 --- a/homeassistant/components/microbees/config_flow.py +++ b/homeassistant/components/microbees/config_flow.py @@ -1,4 +1,5 @@ """Config flow for microBees integration.""" + from collections.abc import Mapping import logging from typing import Any diff --git a/homeassistant/components/microbees/const.py b/homeassistant/components/microbees/const.py index cf7644c8dfa..df4d3f63bd0 100644 --- a/homeassistant/components/microbees/const.py +++ b/homeassistant/components/microbees/const.py @@ -1,4 +1,5 @@ """Constants for the microBees integration.""" + from homeassistant.const import Platform DOMAIN = "microbees" diff --git a/homeassistant/components/microbees/light.py b/homeassistant/components/microbees/light.py index 7616cba41b0..411eab22324 100644 --- a/homeassistant/components/microbees/light.py +++ b/homeassistant/components/microbees/light.py @@ -1,4 +1,5 @@ """Light integration microBees.""" + from typing import Any from homeassistant.components.light import ATTR_RGBW_COLOR, ColorMode, LightEntity diff --git a/homeassistant/components/microbees/sensor.py b/homeassistant/components/microbees/sensor.py index 56db4c00ee3..360422de735 100644 --- a/homeassistant/components/microbees/sensor.py +++ b/homeassistant/components/microbees/sensor.py @@ -1,4 +1,5 @@ """sensor integration microBees.""" + from microBeesPy import Sensor from homeassistant.components.sensor import ( diff --git a/homeassistant/components/microbees/switch.py b/homeassistant/components/microbees/switch.py index 4a52d95620b..8e3c03e9ba4 100644 --- a/homeassistant/components/microbees/switch.py +++ b/homeassistant/components/microbees/switch.py @@ -1,4 +1,5 @@ """Switch integration microBees.""" + from typing import Any from homeassistant.components.switch import SwitchEntity diff --git a/homeassistant/components/microsoft_face/__init__.py b/homeassistant/components/microsoft_face/__init__.py index e3f722ae2be..23535911e5c 100644 --- a/homeassistant/components/microsoft_face/__init__.py +++ b/homeassistant/components/microsoft_face/__init__.py @@ -1,4 +1,5 @@ """Support for Microsoft face recognition.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/microsoft_face_detect/image_processing.py b/homeassistant/components/microsoft_face_detect/image_processing.py index 8b69e21428d..536557bdddb 100644 --- a/homeassistant/components/microsoft_face_detect/image_processing.py +++ b/homeassistant/components/microsoft_face_detect/image_processing.py @@ -1,4 +1,5 @@ """Component that will help set the Microsoft face detect processing.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/microsoft_face_identify/image_processing.py b/homeassistant/components/microsoft_face_identify/image_processing.py index 4c76d29ebc6..7903df22996 100644 --- a/homeassistant/components/microsoft_face_identify/image_processing.py +++ b/homeassistant/components/microsoft_face_identify/image_processing.py @@ -1,4 +1,5 @@ """Component that will help set the Microsoft face for verify processing.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mikrotik/__init__.py b/homeassistant/components/mikrotik/__init__.py index 6c98c389984..76d9a57c7ef 100644 --- a/homeassistant/components/mikrotik/__init__.py +++ b/homeassistant/components/mikrotik/__init__.py @@ -1,4 +1,5 @@ """The Mikrotik component.""" + from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/mikrotik/config_flow.py b/homeassistant/components/mikrotik/config_flow.py index d2a7c5673b0..8e5ff50e590 100644 --- a/homeassistant/components/mikrotik/config_flow.py +++ b/homeassistant/components/mikrotik/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Mikrotik.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/mikrotik/const.py b/homeassistant/components/mikrotik/const.py index 8407dd14a6e..772c956b54b 100644 --- a/homeassistant/components/mikrotik/const.py +++ b/homeassistant/components/mikrotik/const.py @@ -1,4 +1,5 @@ """Constants used in the Mikrotik components.""" + from typing import Final DOMAIN: Final = "mikrotik" diff --git a/homeassistant/components/mikrotik/device_tracker.py b/homeassistant/components/mikrotik/device_tracker.py index 8136334514f..866eba0b8bb 100644 --- a/homeassistant/components/mikrotik/device_tracker.py +++ b/homeassistant/components/mikrotik/device_tracker.py @@ -1,4 +1,5 @@ """Support for Mikrotik routers as device tracker.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/mikrotik/errors.py b/homeassistant/components/mikrotik/errors.py index 22cd63d7468..d3049c7a0b8 100644 --- a/homeassistant/components/mikrotik/errors.py +++ b/homeassistant/components/mikrotik/errors.py @@ -1,4 +1,5 @@ """Errors for the Mikrotik component.""" + from homeassistant.exceptions import HomeAssistantError diff --git a/homeassistant/components/mikrotik/hub.py b/homeassistant/components/mikrotik/hub.py index 044a45fb9b5..6b94a621683 100644 --- a/homeassistant/components/mikrotik/hub.py +++ b/homeassistant/components/mikrotik/hub.py @@ -1,4 +1,5 @@ """The Mikrotik router class.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/mill/__init__.py b/homeassistant/components/mill/__init__.py index 136c4a2940f..401a0f9e854 100644 --- a/homeassistant/components/mill/__init__.py +++ b/homeassistant/components/mill/__init__.py @@ -1,4 +1,5 @@ """The mill component.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/mill/config_flow.py b/homeassistant/components/mill/config_flow.py index ce99f6cab65..58660d6358e 100644 --- a/homeassistant/components/mill/config_flow.py +++ b/homeassistant/components/mill/config_flow.py @@ -1,4 +1,5 @@ """Adds config flow for Mill integration.""" + from mill import Mill from mill_local import Mill as MillLocal import voluptuous as vol diff --git a/homeassistant/components/mill/sensor.py b/homeassistant/components/mill/sensor.py index 8c7c418e8ff..64b9008a82b 100644 --- a/homeassistant/components/mill/sensor.py +++ b/homeassistant/components/mill/sensor.py @@ -1,4 +1,5 @@ """Support for mill wifi-enabled home heaters.""" + from __future__ import annotations import mill diff --git a/homeassistant/components/min_max/config_flow.py b/homeassistant/components/min_max/config_flow.py index f449c98819e..36133f7394d 100644 --- a/homeassistant/components/min_max/config_flow.py +++ b/homeassistant/components/min_max/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Min/Max integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/min_max/sensor.py b/homeassistant/components/min_max/sensor.py index cc26a684a8d..7ced9df661c 100644 --- a/homeassistant/components/min_max/sensor.py +++ b/homeassistant/components/min_max/sensor.py @@ -1,4 +1,5 @@ """Support for displaying minimal, maximal, mean or median values.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/minecraft_server/__init__.py b/homeassistant/components/minecraft_server/__init__.py index 2cd6c51546a..5ec737c3f73 100644 --- a/homeassistant/components/minecraft_server/__init__.py +++ b/homeassistant/components/minecraft_server/__init__.py @@ -1,4 +1,5 @@ """The Minecraft Server integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/minecraft_server/binary_sensor.py b/homeassistant/components/minecraft_server/binary_sensor.py index 974889b7245..707e60dc0db 100644 --- a/homeassistant/components/minecraft_server/binary_sensor.py +++ b/homeassistant/components/minecraft_server/binary_sensor.py @@ -1,4 +1,5 @@ """The Minecraft Server binary sensor platform.""" + from dataclasses import dataclass from homeassistant.components.binary_sensor import ( diff --git a/homeassistant/components/minecraft_server/config_flow.py b/homeassistant/components/minecraft_server/config_flow.py index b870c032b1e..654d903068f 100644 --- a/homeassistant/components/minecraft_server/config_flow.py +++ b/homeassistant/components/minecraft_server/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Minecraft Server integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/minecraft_server/coordinator.py b/homeassistant/components/minecraft_server/coordinator.py index e498375cafc..37eeb9f2ac2 100644 --- a/homeassistant/components/minecraft_server/coordinator.py +++ b/homeassistant/components/minecraft_server/coordinator.py @@ -1,4 +1,5 @@ """The Minecraft Server integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/minecraft_server/diagnostics.py b/homeassistant/components/minecraft_server/diagnostics.py index 62e507ef09f..1cae535dc43 100644 --- a/homeassistant/components/minecraft_server/diagnostics.py +++ b/homeassistant/components/minecraft_server/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics for the Minecraft Server integration.""" + from collections.abc import Iterable from dataclasses import asdict from typing import Any diff --git a/homeassistant/components/minecraft_server/sensor.py b/homeassistant/components/minecraft_server/sensor.py index f6e0805e71b..ada3e68bab7 100644 --- a/homeassistant/components/minecraft_server/sensor.py +++ b/homeassistant/components/minecraft_server/sensor.py @@ -1,4 +1,5 @@ """The Minecraft Server sensor platform.""" + from __future__ import annotations from collections.abc import Callable, MutableMapping diff --git a/homeassistant/components/minio/__init__.py b/homeassistant/components/minio/__init__.py index 1f325f3866d..e2cbcdf9ed1 100644 --- a/homeassistant/components/minio/__init__.py +++ b/homeassistant/components/minio/__init__.py @@ -1,4 +1,5 @@ """Minio component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/minio/minio_helper.py b/homeassistant/components/minio/minio_helper.py index 7edb11797eb..979de40ece7 100644 --- a/homeassistant/components/minio/minio_helper.py +++ b/homeassistant/components/minio/minio_helper.py @@ -1,4 +1,5 @@ """Minio helper methods.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/mjpeg/camera.py b/homeassistant/components/mjpeg/camera.py index d424df620cf..fb8c7e3ef35 100644 --- a/homeassistant/components/mjpeg/camera.py +++ b/homeassistant/components/mjpeg/camera.py @@ -1,4 +1,5 @@ """Support for IP Cameras.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mjpeg/config_flow.py b/homeassistant/components/mjpeg/config_flow.py index c5c3938aff4..84267936788 100644 --- a/homeassistant/components/mjpeg/config_flow.py +++ b/homeassistant/components/mjpeg/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the MJPEG IP Camera integration.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/moat/__init__.py b/homeassistant/components/moat/__init__.py index ed360f53b65..4c48c03b897 100644 --- a/homeassistant/components/moat/__init__.py +++ b/homeassistant/components/moat/__init__.py @@ -1,4 +1,5 @@ """The Moat Bluetooth BLE integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/moat/config_flow.py b/homeassistant/components/moat/config_flow.py index ce400b6851d..e7a1d55f05c 100644 --- a/homeassistant/components/moat/config_flow.py +++ b/homeassistant/components/moat/config_flow.py @@ -1,4 +1,5 @@ """Config flow for moat ble integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/moat/sensor.py b/homeassistant/components/moat/sensor.py index f75717fad40..3118c539d3a 100644 --- a/homeassistant/components/moat/sensor.py +++ b/homeassistant/components/moat/sensor.py @@ -1,4 +1,5 @@ """Support for moat ble sensors.""" + from __future__ import annotations from moat_ble import DeviceClass, DeviceKey, SensorUpdate, Units diff --git a/homeassistant/components/mobile_app/__init__.py b/homeassistant/components/mobile_app/__init__.py index 19aba56f260..28f66954ca3 100644 --- a/homeassistant/components/mobile_app/__init__.py +++ b/homeassistant/components/mobile_app/__init__.py @@ -1,4 +1,5 @@ """Integrates Native Apps to Home Assistant.""" + from contextlib import suppress from typing import Any diff --git a/homeassistant/components/mobile_app/binary_sensor.py b/homeassistant/components/mobile_app/binary_sensor.py index 2be71965371..58683ef378c 100644 --- a/homeassistant/components/mobile_app/binary_sensor.py +++ b/homeassistant/components/mobile_app/binary_sensor.py @@ -1,4 +1,5 @@ """Binary sensor platform for mobile_app.""" + from typing import Any from homeassistant.components.binary_sensor import BinarySensorEntity diff --git a/homeassistant/components/mobile_app/device_action.py b/homeassistant/components/mobile_app/device_action.py index f6e870fc7d6..bebdef0e917 100644 --- a/homeassistant/components/mobile_app/device_action.py +++ b/homeassistant/components/mobile_app/device_action.py @@ -1,4 +1,5 @@ """Provides device actions for Mobile App.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/mobile_app/device_tracker.py b/homeassistant/components/mobile_app/device_tracker.py index fb555db49cb..2c7a4147811 100644 --- a/homeassistant/components/mobile_app/device_tracker.py +++ b/homeassistant/components/mobile_app/device_tracker.py @@ -1,4 +1,5 @@ """Device tracker for Mobile app.""" + from homeassistant.components.device_tracker import ( ATTR_BATTERY, ATTR_GPS, diff --git a/homeassistant/components/mobile_app/entity.py b/homeassistant/components/mobile_app/entity.py index 76cf22cef54..1cac62ce964 100644 --- a/homeassistant/components/mobile_app/entity.py +++ b/homeassistant/components/mobile_app/entity.py @@ -1,4 +1,5 @@ """A entity class for mobile_app.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/mobile_app/helpers.py b/homeassistant/components/mobile_app/helpers.py index 9265b72d0d0..e30974123df 100644 --- a/homeassistant/components/mobile_app/helpers.py +++ b/homeassistant/components/mobile_app/helpers.py @@ -1,4 +1,5 @@ """Helpers for mobile_app.""" + from __future__ import annotations from collections.abc import Callable, Mapping diff --git a/homeassistant/components/mobile_app/http_api.py b/homeassistant/components/mobile_app/http_api.py index b48221c3c56..8c071fe0342 100644 --- a/homeassistant/components/mobile_app/http_api.py +++ b/homeassistant/components/mobile_app/http_api.py @@ -1,4 +1,5 @@ """Provides an HTTP API for mobile_app.""" + from __future__ import annotations from contextlib import suppress diff --git a/homeassistant/components/mobile_app/logbook.py b/homeassistant/components/mobile_app/logbook.py index 083db294a1c..6a863e6a75b 100644 --- a/homeassistant/components/mobile_app/logbook.py +++ b/homeassistant/components/mobile_app/logbook.py @@ -1,4 +1,5 @@ """Describe mobile_app logbook events.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mobile_app/notify.py b/homeassistant/components/mobile_app/notify.py index e6f7126b0b8..c0efd302c47 100644 --- a/homeassistant/components/mobile_app/notify.py +++ b/homeassistant/components/mobile_app/notify.py @@ -1,4 +1,5 @@ """Support for mobile_app push notifications.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mobile_app/push_notification.py b/homeassistant/components/mobile_app/push_notification.py index 0ef9739c8bd..d295a844878 100644 --- a/homeassistant/components/mobile_app/push_notification.py +++ b/homeassistant/components/mobile_app/push_notification.py @@ -1,4 +1,5 @@ """Push notification handling.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mobile_app/sensor.py b/homeassistant/components/mobile_app/sensor.py index fd712faf121..6f049d6f2d5 100644 --- a/homeassistant/components/mobile_app/sensor.py +++ b/homeassistant/components/mobile_app/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for mobile_app.""" + from __future__ import annotations from datetime import date, datetime diff --git a/homeassistant/components/mobile_app/util.py b/homeassistant/components/mobile_app/util.py index a7871d935ed..f139a203c34 100644 --- a/homeassistant/components/mobile_app/util.py +++ b/homeassistant/components/mobile_app/util.py @@ -1,4 +1,5 @@ """Mobile app utility functions.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mobile_app/webhook.py b/homeassistant/components/mobile_app/webhook.py index 19335507b72..0a55a5337b3 100644 --- a/homeassistant/components/mobile_app/webhook.py +++ b/homeassistant/components/mobile_app/webhook.py @@ -1,4 +1,5 @@ """Webhook handlers for mobile_app.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mobile_app/websocket_api.py b/homeassistant/components/mobile_app/websocket_api.py index c900aa8f93b..83c3cb29cea 100644 --- a/homeassistant/components/mobile_app/websocket_api.py +++ b/homeassistant/components/mobile_app/websocket_api.py @@ -1,4 +1,5 @@ """Mobile app websocket API.""" + from __future__ import annotations from functools import wraps diff --git a/homeassistant/components/mochad/light.py b/homeassistant/components/mochad/light.py index b2dba04b205..4740823d85a 100644 --- a/homeassistant/components/mochad/light.py +++ b/homeassistant/components/mochad/light.py @@ -1,4 +1,5 @@ """Support for X10 dimmer over Mochad.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mochad/switch.py b/homeassistant/components/mochad/switch.py index fe90d94e40a..beb12d9d409 100644 --- a/homeassistant/components/mochad/switch.py +++ b/homeassistant/components/mochad/switch.py @@ -1,4 +1,5 @@ """Support for X10 switch over Mochad.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/modbus/__init__.py b/homeassistant/components/modbus/__init__.py index e5bb9e8bf38..8224a79c835 100644 --- a/homeassistant/components/modbus/__init__.py +++ b/homeassistant/components/modbus/__init__.py @@ -1,4 +1,5 @@ """Support for Modbus.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/modbus/base_platform.py b/homeassistant/components/modbus/base_platform.py index ac11bab303d..24d6ce2b307 100644 --- a/homeassistant/components/modbus/base_platform.py +++ b/homeassistant/components/modbus/base_platform.py @@ -1,4 +1,5 @@ """Base implementation for all modbus platforms.""" + from __future__ import annotations from abc import abstractmethod diff --git a/homeassistant/components/modbus/binary_sensor.py b/homeassistant/components/modbus/binary_sensor.py index 6c0f6422df2..0de7a87f219 100644 --- a/homeassistant/components/modbus/binary_sensor.py +++ b/homeassistant/components/modbus/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Modbus Coil and Discrete Input sensors.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/modbus/climate.py b/homeassistant/components/modbus/climate.py index a57fe53ada7..07dd12d3c94 100644 --- a/homeassistant/components/modbus/climate.py +++ b/homeassistant/components/modbus/climate.py @@ -1,4 +1,5 @@ """Support for Generic Modbus Thermostats.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/modbus/const.py b/homeassistant/components/modbus/const.py index e536a31c4f6..a2b3324c4ee 100644 --- a/homeassistant/components/modbus/const.py +++ b/homeassistant/components/modbus/const.py @@ -1,4 +1,5 @@ """Constants used in modbus integration.""" + from enum import Enum from homeassistant.const import ( diff --git a/homeassistant/components/modbus/cover.py b/homeassistant/components/modbus/cover.py index 072f1bb3d93..1221a05a5ac 100644 --- a/homeassistant/components/modbus/cover.py +++ b/homeassistant/components/modbus/cover.py @@ -1,4 +1,5 @@ """Support for Modbus covers.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/modbus/fan.py b/homeassistant/components/modbus/fan.py index e5006b66f81..93e3fdded1a 100644 --- a/homeassistant/components/modbus/fan.py +++ b/homeassistant/components/modbus/fan.py @@ -1,4 +1,5 @@ """Support for Modbus fans.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/modbus/light.py b/homeassistant/components/modbus/light.py index acc01f39b46..16714219bc2 100644 --- a/homeassistant/components/modbus/light.py +++ b/homeassistant/components/modbus/light.py @@ -1,4 +1,5 @@ """Support for Modbus lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/modbus/modbus.py b/homeassistant/components/modbus/modbus.py index c8e7fc3765e..498dcbf0f7e 100644 --- a/homeassistant/components/modbus/modbus.py +++ b/homeassistant/components/modbus/modbus.py @@ -1,4 +1,5 @@ """Support for Modbus.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/modbus/sensor.py b/homeassistant/components/modbus/sensor.py index 4f2a1d6dc76..b21a001c935 100644 --- a/homeassistant/components/modbus/sensor.py +++ b/homeassistant/components/modbus/sensor.py @@ -1,4 +1,5 @@ """Support for Modbus Register sensors.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/modbus/switch.py b/homeassistant/components/modbus/switch.py index 0c955ea409d..ff02e4a7a7e 100644 --- a/homeassistant/components/modbus/switch.py +++ b/homeassistant/components/modbus/switch.py @@ -1,4 +1,5 @@ """Support for Modbus switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/modbus/validators.py b/homeassistant/components/modbus/validators.py index 1819bc649cb..e31cbf79938 100644 --- a/homeassistant/components/modbus/validators.py +++ b/homeassistant/components/modbus/validators.py @@ -1,4 +1,5 @@ """Validate Modbus configuration.""" + from __future__ import annotations from collections import namedtuple diff --git a/homeassistant/components/modem_callerid/__init__.py b/homeassistant/components/modem_callerid/__init__.py index bbdd1b05383..886e33b714b 100644 --- a/homeassistant/components/modem_callerid/__init__.py +++ b/homeassistant/components/modem_callerid/__init__.py @@ -1,4 +1,5 @@ """The Modem Caller ID integration.""" + from phone_modem import PhoneModem from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/modem_callerid/button.py b/homeassistant/components/modem_callerid/button.py index 703339f54e9..3cad9062be9 100644 --- a/homeassistant/components/modem_callerid/button.py +++ b/homeassistant/components/modem_callerid/button.py @@ -1,4 +1,5 @@ """Support for Phone Modem button.""" + from __future__ import annotations from phone_modem import PhoneModem diff --git a/homeassistant/components/modem_callerid/config_flow.py b/homeassistant/components/modem_callerid/config_flow.py index 52bbf51fc61..98e6708a34c 100644 --- a/homeassistant/components/modem_callerid/config_flow.py +++ b/homeassistant/components/modem_callerid/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Modem Caller ID integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/modem_callerid/const.py b/homeassistant/components/modem_callerid/const.py index 361766f22a7..d86d2648a10 100644 --- a/homeassistant/components/modem_callerid/const.py +++ b/homeassistant/components/modem_callerid/const.py @@ -1,4 +1,5 @@ """Constants for the Modem Caller ID integration.""" + from typing import Final from phone_modem import exceptions diff --git a/homeassistant/components/modem_callerid/sensor.py b/homeassistant/components/modem_callerid/sensor.py index aac43b72c0d..00c821f3511 100644 --- a/homeassistant/components/modem_callerid/sensor.py +++ b/homeassistant/components/modem_callerid/sensor.py @@ -1,4 +1,5 @@ """A sensor for incoming calls using a USB modem that supports caller ID.""" + from __future__ import annotations from phone_modem import PhoneModem diff --git a/homeassistant/components/modern_forms/__init__.py b/homeassistant/components/modern_forms/__init__.py index c7310ea35a3..5b33a85578c 100644 --- a/homeassistant/components/modern_forms/__init__.py +++ b/homeassistant/components/modern_forms/__init__.py @@ -1,4 +1,5 @@ """The Modern Forms integration.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/modern_forms/binary_sensor.py b/homeassistant/components/modern_forms/binary_sensor.py index 148499aad2d..0322c5e39d7 100644 --- a/homeassistant/components/modern_forms/binary_sensor.py +++ b/homeassistant/components/modern_forms/binary_sensor.py @@ -1,4 +1,5 @@ """Support for Modern Forms Binary Sensors.""" + from __future__ import annotations from homeassistant.components.binary_sensor import BinarySensorEntity diff --git a/homeassistant/components/modern_forms/config_flow.py b/homeassistant/components/modern_forms/config_flow.py index 80e8bf5cf77..c2b88d65a1b 100644 --- a/homeassistant/components/modern_forms/config_flow.py +++ b/homeassistant/components/modern_forms/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Modern Forms.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/modern_forms/fan.py b/homeassistant/components/modern_forms/fan.py index e6bcff715b8..b714cf04879 100644 --- a/homeassistant/components/modern_forms/fan.py +++ b/homeassistant/components/modern_forms/fan.py @@ -1,4 +1,5 @@ """Support for Modern Forms Fan Fans.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/modern_forms/light.py b/homeassistant/components/modern_forms/light.py index 74763948b9f..3284b96d31f 100644 --- a/homeassistant/components/modern_forms/light.py +++ b/homeassistant/components/modern_forms/light.py @@ -1,4 +1,5 @@ """Support for Modern Forms Fan lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/modern_forms/sensor.py b/homeassistant/components/modern_forms/sensor.py index f6f2255090a..6a92f0fcac2 100644 --- a/homeassistant/components/modern_forms/sensor.py +++ b/homeassistant/components/modern_forms/sensor.py @@ -1,4 +1,5 @@ """Support for Modern Forms switches.""" + from __future__ import annotations from datetime import datetime diff --git a/homeassistant/components/modern_forms/switch.py b/homeassistant/components/modern_forms/switch.py index fef03a96651..d8c76d733fc 100644 --- a/homeassistant/components/modern_forms/switch.py +++ b/homeassistant/components/modern_forms/switch.py @@ -1,4 +1,5 @@ """Support for Modern Forms switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/moehlenhoff_alpha2/__init__.py b/homeassistant/components/moehlenhoff_alpha2/__init__.py index 4a4c57b676e..1611d8ac4bc 100644 --- a/homeassistant/components/moehlenhoff_alpha2/__init__.py +++ b/homeassistant/components/moehlenhoff_alpha2/__init__.py @@ -1,4 +1,5 @@ """Support for the Moehlenhoff Alpha2.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/mold_indicator/sensor.py b/homeassistant/components/mold_indicator/sensor.py index ce3844475c5..86f2aced069 100644 --- a/homeassistant/components/mold_indicator/sensor.py +++ b/homeassistant/components/mold_indicator/sensor.py @@ -1,4 +1,5 @@ """Calculates mold growth indication from temperature and humidity.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/monoprice/config_flow.py b/homeassistant/components/monoprice/config_flow.py index 43286946b7d..7b9113821d1 100644 --- a/homeassistant/components/monoprice/config_flow.py +++ b/homeassistant/components/monoprice/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Monoprice 6-Zone Amplifier integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/moon/__init__.py b/homeassistant/components/moon/__init__.py index e2eaaf89948..72305548fde 100644 --- a/homeassistant/components/moon/__init__.py +++ b/homeassistant/components/moon/__init__.py @@ -1,4 +1,5 @@ """The Moon integration.""" + from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/moon/config_flow.py b/homeassistant/components/moon/config_flow.py index 76f1850d6e7..1c424c866e4 100644 --- a/homeassistant/components/moon/config_flow.py +++ b/homeassistant/components/moon/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure the Moon integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/moon/const.py b/homeassistant/components/moon/const.py index 87c525758b9..3e926b4ff3e 100644 --- a/homeassistant/components/moon/const.py +++ b/homeassistant/components/moon/const.py @@ -1,4 +1,5 @@ """Constants for the Moon integration.""" + from typing import Final from homeassistant.const import Platform diff --git a/homeassistant/components/moon/sensor.py b/homeassistant/components/moon/sensor.py index b7c5b8d7726..cef1dbffbb3 100644 --- a/homeassistant/components/moon/sensor.py +++ b/homeassistant/components/moon/sensor.py @@ -1,4 +1,5 @@ """Support for tracking the moon phases.""" + from __future__ import annotations from astral import moon diff --git a/homeassistant/components/mopeka/__init__.py b/homeassistant/components/mopeka/__init__.py index a000ef0cc88..09dec3bf3d2 100644 --- a/homeassistant/components/mopeka/__init__.py +++ b/homeassistant/components/mopeka/__init__.py @@ -1,4 +1,5 @@ """The Mopeka integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mopeka/config_flow.py b/homeassistant/components/mopeka/config_flow.py index 1bd79c1a20d..1732157ce49 100644 --- a/homeassistant/components/mopeka/config_flow.py +++ b/homeassistant/components/mopeka/config_flow.py @@ -1,4 +1,5 @@ """Config flow for mopeka integration.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/mopeka/device.py b/homeassistant/components/mopeka/device.py index 74bc389d3ae..b1b01c07957 100644 --- a/homeassistant/components/mopeka/device.py +++ b/homeassistant/components/mopeka/device.py @@ -1,4 +1,5 @@ """Support for Mopeka devices.""" + from __future__ import annotations from mopeka_iot_ble import DeviceKey diff --git a/homeassistant/components/mopeka/sensor.py b/homeassistant/components/mopeka/sensor.py index 1cddf42c730..b4b02bb083f 100644 --- a/homeassistant/components/mopeka/sensor.py +++ b/homeassistant/components/mopeka/sensor.py @@ -1,4 +1,5 @@ """Support for Mopeka sensors.""" + from __future__ import annotations from mopeka_iot_ble import SensorUpdate diff --git a/homeassistant/components/motion_blinds/config_flow.py b/homeassistant/components/motion_blinds/config_flow.py index 0d63a2e413d..3ba215a3f4c 100644 --- a/homeassistant/components/motion_blinds/config_flow.py +++ b/homeassistant/components/motion_blinds/config_flow.py @@ -1,4 +1,5 @@ """Config flow to configure Motionblinds using their WLAN API.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/motion_blinds/const.py b/homeassistant/components/motion_blinds/const.py index 4d9f8a7934d..e089fd17943 100644 --- a/homeassistant/components/motion_blinds/const.py +++ b/homeassistant/components/motion_blinds/const.py @@ -1,4 +1,5 @@ """Constants for the Motionblinds component.""" + from homeassistant.const import Platform DOMAIN = "motion_blinds" diff --git a/homeassistant/components/motion_blinds/cover.py b/homeassistant/components/motion_blinds/cover.py index 60d8aae2ff8..eb40a1d66ca 100644 --- a/homeassistant/components/motion_blinds/cover.py +++ b/homeassistant/components/motion_blinds/cover.py @@ -1,4 +1,5 @@ """Support for Motionblinds using their WLAN API.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/motion_blinds/entity.py b/homeassistant/components/motion_blinds/entity.py index 36c45c3afc2..b1495dd8ecf 100644 --- a/homeassistant/components/motion_blinds/entity.py +++ b/homeassistant/components/motion_blinds/entity.py @@ -1,4 +1,5 @@ """Support for Motionblinds using their WLAN API.""" + from __future__ import annotations from motionblinds import DEVICE_TYPES_GATEWAY, DEVICE_TYPES_WIFI, MotionGateway diff --git a/homeassistant/components/motion_blinds/sensor.py b/homeassistant/components/motion_blinds/sensor.py index b746b39bdf0..6418cebda0c 100644 --- a/homeassistant/components/motion_blinds/sensor.py +++ b/homeassistant/components/motion_blinds/sensor.py @@ -1,4 +1,5 @@ """Support for Motionblinds sensors.""" + from motionblinds import DEVICE_TYPES_WIFI from motionblinds.motion_blinds import DEVICE_TYPE_TDBU diff --git a/homeassistant/components/motioneye/__init__.py b/homeassistant/components/motioneye/__init__.py index 37519a236ab..43869ef51de 100644 --- a/homeassistant/components/motioneye/__init__.py +++ b/homeassistant/components/motioneye/__init__.py @@ -1,4 +1,5 @@ """The motionEye integration.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/motioneye/camera.py b/homeassistant/components/motioneye/camera.py index fd3f0ec86c0..da5eb36d494 100644 --- a/homeassistant/components/motioneye/camera.py +++ b/homeassistant/components/motioneye/camera.py @@ -1,4 +1,5 @@ """The motionEye integration.""" + from __future__ import annotations from contextlib import suppress diff --git a/homeassistant/components/motioneye/config_flow.py b/homeassistant/components/motioneye/config_flow.py index fba66c45b8b..bbbd2bc7fba 100644 --- a/homeassistant/components/motioneye/config_flow.py +++ b/homeassistant/components/motioneye/config_flow.py @@ -1,4 +1,5 @@ """Config flow for motionEye integration.""" + from __future__ import annotations from collections.abc import Mapping diff --git a/homeassistant/components/motioneye/const.py b/homeassistant/components/motioneye/const.py index ebe4e24d6cf..15a856035e1 100644 --- a/homeassistant/components/motioneye/const.py +++ b/homeassistant/components/motioneye/const.py @@ -1,4 +1,5 @@ """Constants for the motionEye integration.""" + from datetime import timedelta from typing import Final diff --git a/homeassistant/components/motioneye/media_source.py b/homeassistant/components/motioneye/media_source.py index 46300e3d3db..7c12b84f255 100644 --- a/homeassistant/components/motioneye/media_source.py +++ b/homeassistant/components/motioneye/media_source.py @@ -1,4 +1,5 @@ """motionEye Media Source Implementation.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/motioneye/sensor.py b/homeassistant/components/motioneye/sensor.py index 4d0abb84d46..dac4d77cdb4 100644 --- a/homeassistant/components/motioneye/sensor.py +++ b/homeassistant/components/motioneye/sensor.py @@ -1,4 +1,5 @@ """Sensor platform for motionEye.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/motioneye/switch.py b/homeassistant/components/motioneye/switch.py index 069c5edaad7..81a01587aa0 100644 --- a/homeassistant/components/motioneye/switch.py +++ b/homeassistant/components/motioneye/switch.py @@ -1,4 +1,5 @@ """Switch platform for motionEye.""" + from __future__ import annotations from types import MappingProxyType diff --git a/homeassistant/components/motionmount/__init__.py b/homeassistant/components/motionmount/__init__.py index 6f62a0731b6..28963d83d89 100644 --- a/homeassistant/components/motionmount/__init__.py +++ b/homeassistant/components/motionmount/__init__.py @@ -1,4 +1,5 @@ """The Vogel's MotionMount integration.""" + from __future__ import annotations import socket diff --git a/homeassistant/components/mpd/media_player.py b/homeassistant/components/mpd/media_player.py index 0721afa9d3a..7f69b7bf914 100644 --- a/homeassistant/components/mpd/media_player.py +++ b/homeassistant/components/mpd/media_player.py @@ -1,4 +1,5 @@ """Support to interact with a Music Player Daemon.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index 279dbc57c84..14f92e29cdf 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -1,4 +1,5 @@ """Support for MQTT message handling.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mqtt/alarm_control_panel.py b/homeassistant/components/mqtt/alarm_control_panel.py index 68aca18f249..e4614817790 100644 --- a/homeassistant/components/mqtt/alarm_control_panel.py +++ b/homeassistant/components/mqtt/alarm_control_panel.py @@ -1,4 +1,5 @@ """Control a MQTT alarm.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mqtt/binary_sensor.py b/homeassistant/components/mqtt/binary_sensor.py index 7ab2e9ebf90..80ab11925d4 100644 --- a/homeassistant/components/mqtt/binary_sensor.py +++ b/homeassistant/components/mqtt/binary_sensor.py @@ -1,4 +1,5 @@ """Support for MQTT binary sensors.""" + from __future__ import annotations from datetime import datetime, timedelta diff --git a/homeassistant/components/mqtt/button.py b/homeassistant/components/mqtt/button.py index f0d8037b60d..f6374aaa3cd 100644 --- a/homeassistant/components/mqtt/button.py +++ b/homeassistant/components/mqtt/button.py @@ -1,4 +1,5 @@ """Support for MQTT buttons.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/mqtt/camera.py b/homeassistant/components/mqtt/camera.py index 954cddd20f7..605d37834ec 100644 --- a/homeassistant/components/mqtt/camera.py +++ b/homeassistant/components/mqtt/camera.py @@ -1,4 +1,5 @@ """Camera that loads a picture from an MQTT topic.""" + from __future__ import annotations from base64 import b64decode diff --git a/homeassistant/components/mqtt/client.py b/homeassistant/components/mqtt/client.py index ace3cf9fd64..1cded579c53 100644 --- a/homeassistant/components/mqtt/client.py +++ b/homeassistant/components/mqtt/client.py @@ -1,4 +1,5 @@ """Support for MQTT message handling.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mqtt/climate.py b/homeassistant/components/mqtt/climate.py index 4e85163767c..2deffaea042 100644 --- a/homeassistant/components/mqtt/climate.py +++ b/homeassistant/components/mqtt/climate.py @@ -1,4 +1,5 @@ """Support for MQTT climate devices.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/mqtt/config.py b/homeassistant/components/mqtt/config.py index 895a8e3b581..ed8f58218c6 100644 --- a/homeassistant/components/mqtt/config.py +++ b/homeassistant/components/mqtt/config.py @@ -1,4 +1,5 @@ """Support for MQTT message handling.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/mqtt/config_flow.py b/homeassistant/components/mqtt/config_flow.py index 96ee6596f5a..3889af78591 100644 --- a/homeassistant/components/mqtt/config_flow.py +++ b/homeassistant/components/mqtt/config_flow.py @@ -1,4 +1,5 @@ """Config flow for MQTT.""" + from __future__ import annotations from collections import OrderedDict diff --git a/homeassistant/components/mqtt/config_integration.py b/homeassistant/components/mqtt/config_integration.py index 0f2d617930d..2500923ca9b 100644 --- a/homeassistant/components/mqtt/config_integration.py +++ b/homeassistant/components/mqtt/config_integration.py @@ -1,4 +1,5 @@ """Support for MQTT platform config setup.""" + from __future__ import annotations import voluptuous as vol diff --git a/homeassistant/components/mqtt/cover.py b/homeassistant/components/mqtt/cover.py index dce82774205..a659b1bb0c1 100644 --- a/homeassistant/components/mqtt/cover.py +++ b/homeassistant/components/mqtt/cover.py @@ -1,4 +1,5 @@ """Support for MQTT cover devices.""" + from __future__ import annotations from contextlib import suppress diff --git a/homeassistant/components/mqtt/debug_info.py b/homeassistant/components/mqtt/debug_info.py index 41614a62f30..a3841c27fa3 100644 --- a/homeassistant/components/mqtt/debug_info.py +++ b/homeassistant/components/mqtt/debug_info.py @@ -1,4 +1,5 @@ """Helper to handle a set of topics to subscribe to.""" + from __future__ import annotations from collections import deque diff --git a/homeassistant/components/mqtt/device_automation.py b/homeassistant/components/mqtt/device_automation.py index c0e6f5750fb..25fb510a07e 100644 --- a/homeassistant/components/mqtt/device_automation.py +++ b/homeassistant/components/mqtt/device_automation.py @@ -1,4 +1,5 @@ """Provides device automations for MQTT.""" + from __future__ import annotations import functools diff --git a/homeassistant/components/mqtt/device_tracker.py b/homeassistant/components/mqtt/device_tracker.py index 6e5aeb8f228..417a636434f 100644 --- a/homeassistant/components/mqtt/device_tracker.py +++ b/homeassistant/components/mqtt/device_tracker.py @@ -1,4 +1,5 @@ """Support for tracking MQTT enabled devices identified.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/device_trigger.py b/homeassistant/components/mqtt/device_trigger.py index b6d505d7c98..8ca5e460419 100644 --- a/homeassistant/components/mqtt/device_trigger.py +++ b/homeassistant/components/mqtt/device_trigger.py @@ -1,4 +1,5 @@ """Provides device automations for MQTT.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/diagnostics.py b/homeassistant/components/mqtt/diagnostics.py index 82bae04d2c9..8b278c1e8d6 100644 --- a/homeassistant/components/mqtt/diagnostics.py +++ b/homeassistant/components/mqtt/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for MQTT.""" + from __future__ import annotations from typing import TYPE_CHECKING, Any diff --git a/homeassistant/components/mqtt/discovery.py b/homeassistant/components/mqtt/discovery.py index 84163e217df..5fa1b6297d7 100644 --- a/homeassistant/components/mqtt/discovery.py +++ b/homeassistant/components/mqtt/discovery.py @@ -1,4 +1,5 @@ """Support for MQTT discovery.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mqtt/event.py b/homeassistant/components/mqtt/event.py index 165d273f46e..2a639e55352 100644 --- a/homeassistant/components/mqtt/event.py +++ b/homeassistant/components/mqtt/event.py @@ -1,4 +1,5 @@ """Support for MQTT events.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/fan.py b/homeassistant/components/mqtt/fan.py index 24783e171c8..848e50e3e2e 100644 --- a/homeassistant/components/mqtt/fan.py +++ b/homeassistant/components/mqtt/fan.py @@ -1,4 +1,5 @@ """Support for MQTT fans.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/humidifier.py b/homeassistant/components/mqtt/humidifier.py index 75a74a0dcaa..400b8154c8d 100644 --- a/homeassistant/components/mqtt/humidifier.py +++ b/homeassistant/components/mqtt/humidifier.py @@ -1,4 +1,5 @@ """Support for MQTT humidifiers.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/image.py b/homeassistant/components/mqtt/image.py index 91e11d06371..be3956cc972 100644 --- a/homeassistant/components/mqtt/image.py +++ b/homeassistant/components/mqtt/image.py @@ -1,4 +1,5 @@ """Support for MQTT images.""" + from __future__ import annotations from base64 import b64decode diff --git a/homeassistant/components/mqtt/lawn_mower.py b/homeassistant/components/mqtt/lawn_mower.py index 924d34bf5c7..541ab9e4aa4 100644 --- a/homeassistant/components/mqtt/lawn_mower.py +++ b/homeassistant/components/mqtt/lawn_mower.py @@ -1,4 +1,5 @@ """Support for MQTT lawn mowers.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/light/__init__.py b/homeassistant/components/mqtt/light/__init__.py index a5f3f0aca84..29c5cc20d91 100644 --- a/homeassistant/components/mqtt/light/__init__.py +++ b/homeassistant/components/mqtt/light/__init__.py @@ -1,4 +1,5 @@ """Support for MQTT lights.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/mqtt/light/schema_basic.py b/homeassistant/components/mqtt/light/schema_basic.py index 2ca0a7e7e47..052fa394248 100644 --- a/homeassistant/components/mqtt/light/schema_basic.py +++ b/homeassistant/components/mqtt/light/schema_basic.py @@ -1,4 +1,5 @@ """Support for MQTT lights.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/light/schema_json.py b/homeassistant/components/mqtt/light/schema_json.py index 8f54edc15f4..6d3cd6328b8 100644 --- a/homeassistant/components/mqtt/light/schema_json.py +++ b/homeassistant/components/mqtt/light/schema_json.py @@ -1,4 +1,5 @@ """Support for MQTT JSON lights.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/light/schema_template.py b/homeassistant/components/mqtt/light/schema_template.py index e4900053fb3..95f97f0a736 100644 --- a/homeassistant/components/mqtt/light/schema_template.py +++ b/homeassistant/components/mqtt/light/schema_template.py @@ -1,4 +1,5 @@ """Support for MQTT Template lights.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/lock.py b/homeassistant/components/mqtt/lock.py index 26b6009426c..79e02be9d4f 100644 --- a/homeassistant/components/mqtt/lock.py +++ b/homeassistant/components/mqtt/lock.py @@ -1,4 +1,5 @@ """Support for MQTT locks.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/mixins.py b/homeassistant/components/mqtt/mixins.py index 554e83204dd..a508b05efb4 100644 --- a/homeassistant/components/mqtt/mixins.py +++ b/homeassistant/components/mqtt/mixins.py @@ -1,4 +1,5 @@ """MQTT component mixins and helpers.""" + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/homeassistant/components/mqtt/models.py b/homeassistant/components/mqtt/models.py index 9fcea353299..bfbf9e011eb 100644 --- a/homeassistant/components/mqtt/models.py +++ b/homeassistant/components/mqtt/models.py @@ -1,4 +1,5 @@ """Models used by multiple MQTT modules.""" + from __future__ import annotations from ast import literal_eval diff --git a/homeassistant/components/mqtt/number.py b/homeassistant/components/mqtt/number.py index 83eb047519f..88730d6e7a2 100644 --- a/homeassistant/components/mqtt/number.py +++ b/homeassistant/components/mqtt/number.py @@ -1,4 +1,5 @@ """Configure number in a device through MQTT topic.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/scene.py b/homeassistant/components/mqtt/scene.py index de75f470228..a5ba2700e80 100644 --- a/homeassistant/components/mqtt/scene.py +++ b/homeassistant/components/mqtt/scene.py @@ -1,4 +1,5 @@ """Support for MQTT scenes.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/mqtt/select.py b/homeassistant/components/mqtt/select.py index 5d9bc989c25..af09f5c0202 100644 --- a/homeassistant/components/mqtt/select.py +++ b/homeassistant/components/mqtt/select.py @@ -1,4 +1,5 @@ """Configure select in a device through MQTT topic.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/sensor.py b/homeassistant/components/mqtt/sensor.py index 9d1ed964be3..bb63ae5fef0 100644 --- a/homeassistant/components/mqtt/sensor.py +++ b/homeassistant/components/mqtt/sensor.py @@ -1,4 +1,5 @@ """Support for MQTT sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/siren.py b/homeassistant/components/mqtt/siren.py index cb2ecbafa55..2725743735d 100644 --- a/homeassistant/components/mqtt/siren.py +++ b/homeassistant/components/mqtt/siren.py @@ -1,4 +1,5 @@ """Support for MQTT sirens.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/subscription.py b/homeassistant/components/mqtt/subscription.py index 3f8f0f4ee3e..14f2999fa9c 100644 --- a/homeassistant/components/mqtt/subscription.py +++ b/homeassistant/components/mqtt/subscription.py @@ -1,4 +1,5 @@ """Helper to handle a set of topics to subscribe to.""" + from __future__ import annotations from collections.abc import Callable, Coroutine diff --git a/homeassistant/components/mqtt/switch.py b/homeassistant/components/mqtt/switch.py index c45e6dd77ab..8be42a9ed19 100644 --- a/homeassistant/components/mqtt/switch.py +++ b/homeassistant/components/mqtt/switch.py @@ -1,4 +1,5 @@ """Support for MQTT switches.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/tag.py b/homeassistant/components/mqtt/tag.py index 42c8760c302..42f6915fc91 100644 --- a/homeassistant/components/mqtt/tag.py +++ b/homeassistant/components/mqtt/tag.py @@ -1,4 +1,5 @@ """Provides tag scanning for MQTT.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/text.py b/homeassistant/components/mqtt/text.py index fb121c25a9c..e5786dbe94d 100644 --- a/homeassistant/components/mqtt/text.py +++ b/homeassistant/components/mqtt/text.py @@ -1,4 +1,5 @@ """Support for MQTT text platform.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/trigger.py b/homeassistant/components/mqtt/trigger.py index 623c6c53373..d7086885b24 100644 --- a/homeassistant/components/mqtt/trigger.py +++ b/homeassistant/components/mqtt/trigger.py @@ -1,4 +1,5 @@ """Offer MQTT listening automation rules.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mqtt/update.py b/homeassistant/components/mqtt/update.py index 45424995224..0171e8eee2d 100644 --- a/homeassistant/components/mqtt/update.py +++ b/homeassistant/components/mqtt/update.py @@ -1,4 +1,5 @@ """Configure update platform in a device through MQTT topic.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mqtt/valve.py b/homeassistant/components/mqtt/valve.py index 9d167f42d12..241d6748280 100644 --- a/homeassistant/components/mqtt/valve.py +++ b/homeassistant/components/mqtt/valve.py @@ -1,4 +1,5 @@ """Support for MQTT valve devices.""" + from __future__ import annotations from contextlib import suppress diff --git a/homeassistant/components/mqtt/water_heater.py b/homeassistant/components/mqtt/water_heater.py index a2cf2e511a0..f8061873c69 100644 --- a/homeassistant/components/mqtt/water_heater.py +++ b/homeassistant/components/mqtt/water_heater.py @@ -1,4 +1,5 @@ """Support for MQTT water heater devices.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mqtt_json/device_tracker.py b/homeassistant/components/mqtt_json/device_tracker.py index 2b355eb68e6..68f42479930 100644 --- a/homeassistant/components/mqtt_json/device_tracker.py +++ b/homeassistant/components/mqtt_json/device_tracker.py @@ -1,4 +1,5 @@ """Support for GPS tracking MQTT enabled devices.""" + from __future__ import annotations import json diff --git a/homeassistant/components/mqtt_room/sensor.py b/homeassistant/components/mqtt_room/sensor.py index cb0e840604e..df0be7b4968 100644 --- a/homeassistant/components/mqtt_room/sensor.py +++ b/homeassistant/components/mqtt_room/sensor.py @@ -1,4 +1,5 @@ """Support for MQTT room presence detection.""" + from __future__ import annotations from datetime import timedelta diff --git a/homeassistant/components/msteams/notify.py b/homeassistant/components/msteams/notify.py index 7a729897e76..d6ebdf3e711 100644 --- a/homeassistant/components/msteams/notify.py +++ b/homeassistant/components/msteams/notify.py @@ -1,4 +1,5 @@ """Microsoft Teams platform for notify component.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mullvad/binary_sensor.py b/homeassistant/components/mullvad/binary_sensor.py index 264bbe15520..2e649d9a586 100644 --- a/homeassistant/components/mullvad/binary_sensor.py +++ b/homeassistant/components/mullvad/binary_sensor.py @@ -1,4 +1,5 @@ """Setup Mullvad VPN Binary Sensors.""" + from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, diff --git a/homeassistant/components/mullvad/config_flow.py b/homeassistant/components/mullvad/config_flow.py index f576dbc08af..55957f160a3 100644 --- a/homeassistant/components/mullvad/config_flow.py +++ b/homeassistant/components/mullvad/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Mullvad VPN integration.""" + from mullvad_api import MullvadAPI, MullvadAPIError from homeassistant.config_entries import ConfigFlow, ConfigFlowResult diff --git a/homeassistant/components/mutesync/__init__.py b/homeassistant/components/mutesync/__init__.py index cbbbbaa6a11..40aba72b0f6 100644 --- a/homeassistant/components/mutesync/__init__.py +++ b/homeassistant/components/mutesync/__init__.py @@ -1,4 +1,5 @@ """The mütesync integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mutesync/binary_sensor.py b/homeassistant/components/mutesync/binary_sensor.py index 910f91fc4c6..87bf246f4e0 100644 --- a/homeassistant/components/mutesync/binary_sensor.py +++ b/homeassistant/components/mutesync/binary_sensor.py @@ -1,4 +1,5 @@ """mütesync binary sensor entities.""" + from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant diff --git a/homeassistant/components/mutesync/config_flow.py b/homeassistant/components/mutesync/config_flow.py index 75c15ff2f50..2399cdc063e 100644 --- a/homeassistant/components/mutesync/config_flow.py +++ b/homeassistant/components/mutesync/config_flow.py @@ -1,4 +1,5 @@ """Config flow for mütesync integration.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mutesync/const.py b/homeassistant/components/mutesync/const.py index 027a48f46ca..9fd04d1e0c5 100644 --- a/homeassistant/components/mutesync/const.py +++ b/homeassistant/components/mutesync/const.py @@ -1,4 +1,5 @@ """Constants for the mütesync integration.""" + from datetime import timedelta from typing import Final diff --git a/homeassistant/components/mvglive/sensor.py b/homeassistant/components/mvglive/sensor.py index 2f8467a0333..39d77edbfa7 100644 --- a/homeassistant/components/mvglive/sensor.py +++ b/homeassistant/components/mvglive/sensor.py @@ -1,4 +1,5 @@ """Support for departure information for public transport in Munich.""" + from __future__ import annotations from copy import deepcopy diff --git a/homeassistant/components/my/__init__.py b/homeassistant/components/my/__init__.py index d699e42e105..d18589f66ce 100644 --- a/homeassistant/components/my/__init__.py +++ b/homeassistant/components/my/__init__.py @@ -1,4 +1,5 @@ """Support for my.home-assistant.io redirect service.""" + from homeassistant.components import frontend from homeassistant.core import HomeAssistant from homeassistant.helpers import config_validation as cv diff --git a/homeassistant/components/mycroft/notify.py b/homeassistant/components/mycroft/notify.py index a9dd82caef1..67203ae0564 100644 --- a/homeassistant/components/mycroft/notify.py +++ b/homeassistant/components/mycroft/notify.py @@ -1,4 +1,5 @@ """Mycroft AI notification platform.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/myq/__init__.py b/homeassistant/components/myq/__init__.py index 86a158c09fa..41b36a34c20 100644 --- a/homeassistant/components/myq/__init__.py +++ b/homeassistant/components/myq/__init__.py @@ -1,4 +1,5 @@ """The MyQ integration.""" + from __future__ import annotations from homeassistant.config_entries import ConfigEntry, ConfigEntryState diff --git a/homeassistant/components/mysensors/__init__.py b/homeassistant/components/mysensors/__init__.py index a3f52cd28ab..699190a087c 100644 --- a/homeassistant/components/mysensors/__init__.py +++ b/homeassistant/components/mysensors/__init__.py @@ -1,4 +1,5 @@ """Connect to a MySensors gateway via pymysensors API.""" + from __future__ import annotations from collections.abc import Callable, Mapping diff --git a/homeassistant/components/mysensors/binary_sensor.py b/homeassistant/components/mysensors/binary_sensor.py index b70a7fc8d55..a0a1c92c682 100644 --- a/homeassistant/components/mysensors/binary_sensor.py +++ b/homeassistant/components/mysensors/binary_sensor.py @@ -1,4 +1,5 @@ """Support for MySensors binary sensors.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mysensors/climate.py b/homeassistant/components/mysensors/climate.py index 0058fca021e..0008297f299 100644 --- a/homeassistant/components/mysensors/climate.py +++ b/homeassistant/components/mysensors/climate.py @@ -1,4 +1,5 @@ """MySensors platform that offers a Climate (MySensors-HVAC) component.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/mysensors/config_flow.py b/homeassistant/components/mysensors/config_flow.py index c4926696643..7920e8025cf 100644 --- a/homeassistant/components/mysensors/config_flow.py +++ b/homeassistant/components/mysensors/config_flow.py @@ -1,4 +1,5 @@ """Config flow for MySensors.""" + from __future__ import annotations import os diff --git a/homeassistant/components/mysensors/const.py b/homeassistant/components/mysensors/const.py index 0a4b4c090ef..3885a2d7a0e 100644 --- a/homeassistant/components/mysensors/const.py +++ b/homeassistant/components/mysensors/const.py @@ -1,4 +1,5 @@ """MySensors constants.""" + from __future__ import annotations from collections import defaultdict diff --git a/homeassistant/components/mysensors/cover.py b/homeassistant/components/mysensors/cover.py index 8be5f1f8620..acd5643965f 100644 --- a/homeassistant/components/mysensors/cover.py +++ b/homeassistant/components/mysensors/cover.py @@ -1,4 +1,5 @@ """Support for MySensors covers.""" + from __future__ import annotations from enum import Enum, unique diff --git a/homeassistant/components/mysensors/device.py b/homeassistant/components/mysensors/device.py index c70ef1f89ed..5caa42c282c 100644 --- a/homeassistant/components/mysensors/device.py +++ b/homeassistant/components/mysensors/device.py @@ -1,4 +1,5 @@ """Handle MySensors devices.""" + from __future__ import annotations from abc import abstractmethod diff --git a/homeassistant/components/mysensors/device_tracker.py b/homeassistant/components/mysensors/device_tracker.py index d56e9874560..968ee94b60e 100644 --- a/homeassistant/components/mysensors/device_tracker.py +++ b/homeassistant/components/mysensors/device_tracker.py @@ -1,4 +1,5 @@ """Support for tracking MySensors devices.""" + from __future__ import annotations from homeassistant.components.device_tracker import SourceType, TrackerEntity diff --git a/homeassistant/components/mysensors/gateway.py b/homeassistant/components/mysensors/gateway.py index 28cacbe7762..3bdd884079e 100644 --- a/homeassistant/components/mysensors/gateway.py +++ b/homeassistant/components/mysensors/gateway.py @@ -1,4 +1,5 @@ """Handle MySensors gateways.""" + from __future__ import annotations import asyncio diff --git a/homeassistant/components/mysensors/handler.py b/homeassistant/components/mysensors/handler.py index aa8a235c7cb..20e0ddd0e5a 100644 --- a/homeassistant/components/mysensors/handler.py +++ b/homeassistant/components/mysensors/handler.py @@ -1,4 +1,5 @@ """Handle MySensors messages.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mysensors/helpers.py b/homeassistant/components/mysensors/helpers.py index 9985929eecd..cb075b8f485 100644 --- a/homeassistant/components/mysensors/helpers.py +++ b/homeassistant/components/mysensors/helpers.py @@ -1,4 +1,5 @@ """Helper functions for mysensors package.""" + from __future__ import annotations from collections import defaultdict diff --git a/homeassistant/components/mysensors/light.py b/homeassistant/components/mysensors/light.py index 7aea1e906a6..c3691a40140 100644 --- a/homeassistant/components/mysensors/light.py +++ b/homeassistant/components/mysensors/light.py @@ -1,4 +1,5 @@ """Support for MySensors lights.""" + from __future__ import annotations from typing import Any, cast diff --git a/homeassistant/components/mysensors/remote.py b/homeassistant/components/mysensors/remote.py index 8521e407ae1..e9404bb3197 100644 --- a/homeassistant/components/mysensors/remote.py +++ b/homeassistant/components/mysensors/remote.py @@ -1,4 +1,5 @@ """Support MySensors IR transceivers.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/homeassistant/components/mysensors/sensor.py b/homeassistant/components/mysensors/sensor.py index 84ae1ed031f..537bf575af0 100644 --- a/homeassistant/components/mysensors/sensor.py +++ b/homeassistant/components/mysensors/sensor.py @@ -1,4 +1,5 @@ """Support for MySensors sensors.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/mysensors/switch.py b/homeassistant/components/mysensors/switch.py index b1ec1a420d2..400ef2c5896 100644 --- a/homeassistant/components/mysensors/switch.py +++ b/homeassistant/components/mysensors/switch.py @@ -1,4 +1,5 @@ """Support for MySensors switches.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/mysensors/text.py b/homeassistant/components/mysensors/text.py index 68fa2a434d5..021324d7a67 100644 --- a/homeassistant/components/mysensors/text.py +++ b/homeassistant/components/mysensors/text.py @@ -1,4 +1,5 @@ """Provide a text platform for MySensors.""" + from __future__ import annotations from homeassistant.components.text import TextEntity diff --git a/homeassistant/components/mystrom/__init__.py b/homeassistant/components/mystrom/__init__.py index 3b033e3338c..3c6a5805ddb 100644 --- a/homeassistant/components/mystrom/__init__.py +++ b/homeassistant/components/mystrom/__init__.py @@ -1,4 +1,5 @@ """The myStrom integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mystrom/binary_sensor.py b/homeassistant/components/mystrom/binary_sensor.py index 33e78ca3afe..2201eb778d6 100644 --- a/homeassistant/components/mystrom/binary_sensor.py +++ b/homeassistant/components/mystrom/binary_sensor.py @@ -1,4 +1,5 @@ """Support for the myStrom buttons.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/mystrom/config_flow.py b/homeassistant/components/mystrom/config_flow.py index dc603a16c34..38b292e9f97 100644 --- a/homeassistant/components/mystrom/config_flow.py +++ b/homeassistant/components/mystrom/config_flow.py @@ -1,4 +1,5 @@ """Config flow for myStrom integration.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mystrom/light.py b/homeassistant/components/mystrom/light.py index ce9357d23f7..5dabb609437 100644 --- a/homeassistant/components/mystrom/light.py +++ b/homeassistant/components/mystrom/light.py @@ -1,4 +1,5 @@ """Support for myStrom Wifi bulbs.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mystrom/models.py b/homeassistant/components/mystrom/models.py index 96cc40996ef..694a2f43df6 100644 --- a/homeassistant/components/mystrom/models.py +++ b/homeassistant/components/mystrom/models.py @@ -1,4 +1,5 @@ """Models for the mystrom integration.""" + from dataclasses import dataclass from typing import Any diff --git a/homeassistant/components/mystrom/sensor.py b/homeassistant/components/mystrom/sensor.py index 4551c9ebbec..f7805cd9012 100644 --- a/homeassistant/components/mystrom/sensor.py +++ b/homeassistant/components/mystrom/sensor.py @@ -1,4 +1,5 @@ """Support for myStrom sensors of switches/plugs.""" + from __future__ import annotations from collections.abc import Callable diff --git a/homeassistant/components/mystrom/switch.py b/homeassistant/components/mystrom/switch.py index 8f459e6801e..9958fcf7f01 100644 --- a/homeassistant/components/mystrom/switch.py +++ b/homeassistant/components/mystrom/switch.py @@ -1,4 +1,5 @@ """Support for myStrom switches/plugs.""" + from __future__ import annotations import logging diff --git a/homeassistant/components/mythicbeastsdns/__init__.py b/homeassistant/components/mythicbeastsdns/__init__.py index 2319bc8f812..f4de18aa0ef 100644 --- a/homeassistant/components/mythicbeastsdns/__init__.py +++ b/homeassistant/components/mythicbeastsdns/__init__.py @@ -1,4 +1,5 @@ """Support for Mythic Beasts Dynamic DNS service.""" + from datetime import timedelta import mbddns diff --git a/homeassistant/components/myuplink/__init__.py b/homeassistant/components/myuplink/__init__.py index fcfffc54b31..4e3305cf713 100644 --- a/homeassistant/components/myuplink/__init__.py +++ b/homeassistant/components/myuplink/__init__.py @@ -1,4 +1,5 @@ """The myUplink integration.""" + from __future__ import annotations from http import HTTPStatus diff --git a/homeassistant/components/myuplink/api.py b/homeassistant/components/myuplink/api.py index 1b74d41bc97..89a5d0c19b0 100644 --- a/homeassistant/components/myuplink/api.py +++ b/homeassistant/components/myuplink/api.py @@ -1,4 +1,5 @@ """API for myUplink bound to Home Assistant OAuth.""" + from __future__ import annotations from typing import cast diff --git a/homeassistant/components/myuplink/config_flow.py b/homeassistant/components/myuplink/config_flow.py index fee571effa6..fe31dcc6183 100644 --- a/homeassistant/components/myuplink/config_flow.py +++ b/homeassistant/components/myuplink/config_flow.py @@ -1,4 +1,5 @@ """Config flow for myUplink.""" + from collections.abc import Mapping import logging from typing import Any diff --git a/homeassistant/components/myuplink/diagnostics.py b/homeassistant/components/myuplink/diagnostics.py index 55cbb07c0d0..d108db595a1 100644 --- a/homeassistant/components/myuplink/diagnostics.py +++ b/homeassistant/components/myuplink/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for myUplink.""" + from __future__ import annotations from typing import Any diff --git a/homeassistant/components/myuplink/entity.py b/homeassistant/components/myuplink/entity.py index e3d6184c368..351ba6bfc92 100644 --- a/homeassistant/components/myuplink/entity.py +++ b/homeassistant/components/myuplink/entity.py @@ -1,4 +1,5 @@ """Provide a common entity class for myUplink entities.""" + from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.update_coordinator import CoordinatorEntity