diff --git a/homeassistant/components/airly/sensor.py b/homeassistant/components/airly/sensor.py index 7fbfe2077a77..fc587f151402 100644 --- a/homeassistant/components/airly/sensor.py +++ b/homeassistant/components/airly/sensor.py @@ -1,8 +1,9 @@ """Support for the Airly sensor service.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass -from typing import Any, Callable, cast +from typing import Any, cast from homeassistant.components.sensor import ( STATE_CLASS_MEASUREMENT, diff --git a/homeassistant/components/asuswrt/router.py b/homeassistant/components/asuswrt/router.py index 5cdcfb834b84..7e89ea07dbdd 100644 --- a/homeassistant/components/asuswrt/router.py +++ b/homeassistant/components/asuswrt/router.py @@ -1,9 +1,10 @@ """Represent the AsusWrt router.""" from __future__ import annotations +from collections.abc import Callable from datetime import datetime, timedelta import logging -from typing import Any, Callable +from typing import Any from aioasuswrt.asuswrt import AsusWrt diff --git a/homeassistant/components/august/binary_sensor.py b/homeassistant/components/august/binary_sensor.py index 6a2c9a2ff6d7..804a9810a946 100644 --- a/homeassistant/components/august/binary_sensor.py +++ b/homeassistant/components/august/binary_sensor.py @@ -1,10 +1,11 @@ """Support for August binary sensors.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass from datetime import datetime, timedelta import logging -from typing import Callable, cast +from typing import cast from yalexs.activity import ( ACTION_DOORBELL_CALL_MISSED, diff --git a/homeassistant/components/august/sensor.py b/homeassistant/components/august/sensor.py index e78ae520034c..263d20be1b60 100644 --- a/homeassistant/components/august/sensor.py +++ b/homeassistant/components/august/sensor.py @@ -1,9 +1,10 @@ """Support for August sensors.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass import logging -from typing import Callable, Generic, TypeVar +from typing import Generic, TypeVar from yalexs.activity import ActivityType from yalexs.keypad import KeypadDetail diff --git a/homeassistant/components/bluetooth_tracker/device_tracker.py b/homeassistant/components/bluetooth_tracker/device_tracker.py index ca1da5987a42..8883f600019c 100644 --- a/homeassistant/components/bluetooth_tracker/device_tracker.py +++ b/homeassistant/components/bluetooth_tracker/device_tracker.py @@ -2,10 +2,10 @@ from __future__ import annotations import asyncio -from collections.abc import Awaitable +from collections.abc import Awaitable, Callable from datetime import datetime, timedelta import logging -from typing import Any, Callable, Final +from typing import Any, Final import bluetooth # pylint: disable=import-error from bt_proximity import BluetoothRSSI diff --git a/homeassistant/components/crownstone/config_flow.py b/homeassistant/components/crownstone/config_flow.py index 86826f5f6f8d..7c0ea4fd27d5 100644 --- a/homeassistant/components/crownstone/config_flow.py +++ b/homeassistant/components/crownstone/config_flow.py @@ -1,7 +1,8 @@ """Flow handler for Crownstone.""" from __future__ import annotations -from typing import Any, Callable +from collections.abc import Callable +from typing import Any from crownstone_cloud import CrownstoneCloud from crownstone_cloud.exceptions import ( diff --git a/homeassistant/components/devolo_home_control/subscriber.py b/homeassistant/components/devolo_home_control/subscriber.py index 9899aa3a587d..13ffabeaba21 100644 --- a/homeassistant/components/devolo_home_control/subscriber.py +++ b/homeassistant/components/devolo_home_control/subscriber.py @@ -1,7 +1,6 @@ """Subscriber for devolo home control API publisher.""" - +from collections.abc import Callable import logging -from typing import Callable _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/energy/data.py b/homeassistant/components/energy/data.py index 1cea20564b4a..f8c14ed8b73b 100644 --- a/homeassistant/components/energy/data.py +++ b/homeassistant/components/energy/data.py @@ -3,8 +3,8 @@ from __future__ import annotations import asyncio from collections import Counter -from collections.abc import Awaitable -from typing import Callable, Literal, Optional, TypedDict, Union, cast +from collections.abc import Awaitable, Callable +from typing import Literal, Optional, TypedDict, Union, cast import voluptuous as vol diff --git a/homeassistant/components/esphome/entry_data.py b/homeassistant/components/esphome/entry_data.py index 2b926b9b2709..51fc18ee37e1 100644 --- a/homeassistant/components/esphome/entry_data.py +++ b/homeassistant/components/esphome/entry_data.py @@ -2,8 +2,9 @@ from __future__ import annotations import asyncio +from collections.abc import Callable from dataclasses import dataclass, field -from typing import Any, Callable, cast +from typing import Any, cast from aioesphomeapi import ( COMPONENT_TYPE_TO_INFO, diff --git a/homeassistant/components/fjaraskupan/__init__.py b/homeassistant/components/fjaraskupan/__init__.py index 9d635e3bf7f2..ac22e788a6ef 100644 --- a/homeassistant/components/fjaraskupan/__init__.py +++ b/homeassistant/components/fjaraskupan/__init__.py @@ -1,10 +1,10 @@ """The Fjäråskupan integration.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass from datetime import timedelta import logging -from typing import Callable from bleak import BleakScanner from bleak.backends.device import BLEDevice diff --git a/homeassistant/components/fjaraskupan/binary_sensor.py b/homeassistant/components/fjaraskupan/binary_sensor.py index 2484a0d9bc2b..9af93eaf9c0a 100644 --- a/homeassistant/components/fjaraskupan/binary_sensor.py +++ b/homeassistant/components/fjaraskupan/binary_sensor.py @@ -1,8 +1,8 @@ """Support for sensors.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass -from typing import Callable from fjaraskupan import Device, State diff --git a/homeassistant/components/fritz/common.py b/homeassistant/components/fritz/common.py index a8c77f2deb2c..6b0f0873c851 100644 --- a/homeassistant/components/fritz/common.py +++ b/homeassistant/components/fritz/common.py @@ -1,12 +1,12 @@ """Support for AVM FRITZ!Box classes.""" from __future__ import annotations -from collections.abc import ValuesView +from collections.abc import Callable, ValuesView from dataclasses import dataclass, field from datetime import datetime, timedelta import logging from types import MappingProxyType -from typing import Any, Callable, TypedDict +from typing import Any, TypedDict from fritzconnection import FritzConnection from fritzconnection.core.exceptions import ( diff --git a/homeassistant/components/fritz/sensor.py b/homeassistant/components/fritz/sensor.py index 53efc7a83f3f..15aed604ffc9 100644 --- a/homeassistant/components/fritz/sensor.py +++ b/homeassistant/components/fritz/sensor.py @@ -1,9 +1,10 @@ """AVM FRITZ!Box binary sensors.""" from __future__ import annotations +from collections.abc import Callable import datetime import logging -from typing import Callable, TypedDict +from typing import TypedDict from fritzconnection.core.exceptions import ( FritzActionError, diff --git a/homeassistant/components/gios/model.py b/homeassistant/components/gios/model.py index b6ae9a9f78f8..0f5d992590b1 100644 --- a/homeassistant/components/gios/model.py +++ b/homeassistant/components/gios/model.py @@ -1,8 +1,8 @@ """Type definitions for GIOS integration.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass -from typing import Callable from homeassistant.components.sensor import SensorEntityDescription diff --git a/homeassistant/components/gogogate2/common.py b/homeassistant/components/gogogate2/common.py index c1f81f8fd329..5d1900340284 100644 --- a/homeassistant/components/gogogate2/common.py +++ b/homeassistant/components/gogogate2/common.py @@ -1,10 +1,10 @@ """Common code for GogoGate2 component.""" from __future__ import annotations -from collections.abc import Awaitable, Mapping +from collections.abc import Awaitable, Callable, Mapping from datetime import timedelta import logging -from typing import Any, Callable, NamedTuple +from typing import Any, NamedTuple from ismartgate import AbstractGateApi, GogoGate2Api, ISmartGateApi from ismartgate.common import AbstractDoor, get_door_by_id diff --git a/homeassistant/components/gtfs/sensor.py b/homeassistant/components/gtfs/sensor.py index f97bc9796ecf..9450c717148d 100644 --- a/homeassistant/components/gtfs/sensor.py +++ b/homeassistant/components/gtfs/sensor.py @@ -1,11 +1,12 @@ """Support for GTFS (Google/General Transport Format Schema).""" from __future__ import annotations +from collections.abc import Callable import datetime import logging import os import threading -from typing import Any, Callable +from typing import Any import pygtfs from sqlalchemy.sql import text diff --git a/homeassistant/components/guardian/util.py b/homeassistant/components/guardian/util.py index c4d0e0be4d72..d83334e7a40b 100644 --- a/homeassistant/components/guardian/util.py +++ b/homeassistant/components/guardian/util.py @@ -2,9 +2,9 @@ from __future__ import annotations import asyncio -from collections.abc import Awaitable +from collections.abc import Awaitable, Callable from datetime import timedelta -from typing import Any, Callable, Dict, cast +from typing import Any, Dict, cast from aioguardian import Client from aioguardian.errors import GuardianError diff --git a/homeassistant/components/hyperion/__init__.py b/homeassistant/components/hyperion/__init__.py index 36185c687580..b43b25ca5acf 100644 --- a/homeassistant/components/hyperion/__init__.py +++ b/homeassistant/components/hyperion/__init__.py @@ -2,9 +2,10 @@ from __future__ import annotations import asyncio +from collections.abc import Callable from contextlib import suppress import logging -from typing import Any, Callable, cast +from typing import Any, cast from awesomeversion import AwesomeVersion from hyperion import client, const as hyperion_const diff --git a/homeassistant/components/hyperion/light.py b/homeassistant/components/hyperion/light.py index e9d23b4077e0..d27e96e85de3 100644 --- a/homeassistant/components/hyperion/light.py +++ b/homeassistant/components/hyperion/light.py @@ -1,11 +1,11 @@ """Support for Hyperion-NG remotes.""" from __future__ import annotations -from collections.abc import Mapping, Sequence +from collections.abc import Callable, Mapping, Sequence import functools import logging from types import MappingProxyType -from typing import Any, Callable +from typing import Any from hyperion import client, const diff --git a/homeassistant/components/kostal_plenticore/sensor.py b/homeassistant/components/kostal_plenticore/sensor.py index 19ac4db0f90b..15971cec68d5 100644 --- a/homeassistant/components/kostal_plenticore/sensor.py +++ b/homeassistant/components/kostal_plenticore/sensor.py @@ -1,9 +1,10 @@ """Platform for Kostal Plenticore sensors.""" from __future__ import annotations +from collections.abc import Callable from datetime import timedelta import logging -from typing import Any, Callable +from typing import Any from homeassistant.components.sensor import ATTR_STATE_CLASS, SensorEntity from homeassistant.config_entries import ConfigEntry diff --git a/homeassistant/components/kraken/const.py b/homeassistant/components/kraken/const.py index 669d64a49c8c..7382510efd0a 100644 --- a/homeassistant/components/kraken/const.py +++ b/homeassistant/components/kraken/const.py @@ -1,8 +1,9 @@ """Constants for the kraken integration.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass -from typing import Callable, Dict, TypedDict +from typing import Dict, TypedDict from homeassistant.components.sensor import SensorEntityDescription from homeassistant.helpers.update_coordinator import DataUpdateCoordinator diff --git a/homeassistant/components/lcn/__init__.py b/homeassistant/components/lcn/__init__.py index 9db564812a80..48a63a50fa92 100644 --- a/homeassistant/components/lcn/__init__.py +++ b/homeassistant/components/lcn/__init__.py @@ -1,8 +1,8 @@ """Support for LCN devices.""" from __future__ import annotations +from collections.abc import Callable import logging -from typing import Callable import pypck diff --git a/homeassistant/components/litejet/trigger.py b/homeassistant/components/litejet/trigger.py index 5ff841a55c39..21b7927ebe2a 100644 --- a/homeassistant/components/litejet/trigger.py +++ b/homeassistant/components/litejet/trigger.py @@ -1,5 +1,5 @@ """Trigger an automation when a LiteJet switch is released.""" -from typing import Callable +from collections.abc import Callable import voluptuous as vol diff --git a/homeassistant/components/melcloud/sensor.py b/homeassistant/components/melcloud/sensor.py index 608c35477246..19be1ea172dc 100644 --- a/homeassistant/components/melcloud/sensor.py +++ b/homeassistant/components/melcloud/sensor.py @@ -1,8 +1,9 @@ """Support for MelCloud device sensors.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass -from typing import Any, Callable +from typing import Any from pymelcloud import DEVICE_TYPE_ATA, DEVICE_TYPE_ATW from pymelcloud.atw_device import Zone diff --git a/homeassistant/components/modbus/base_platform.py b/homeassistant/components/modbus/base_platform.py index 0c91fe8e3a6d..95f8d33b3666 100644 --- a/homeassistant/components/modbus/base_platform.py +++ b/homeassistant/components/modbus/base_platform.py @@ -2,10 +2,11 @@ from __future__ import annotations from abc import abstractmethod +from collections.abc import Callable from datetime import datetime, timedelta import logging import struct -from typing import Any, Callable, cast +from typing import Any, cast from homeassistant.const import ( CONF_ADDRESS, diff --git a/homeassistant/components/modbus/modbus.py b/homeassistant/components/modbus/modbus.py index f30f78930221..e81afc968caf 100644 --- a/homeassistant/components/modbus/modbus.py +++ b/homeassistant/components/modbus/modbus.py @@ -3,8 +3,9 @@ from __future__ import annotations import asyncio from collections import namedtuple +from collections.abc import Callable import logging -from typing import Any, Callable +from typing import Any from pymodbus.client.sync import ( BaseModbusClient, diff --git a/homeassistant/components/nws/__init__.py b/homeassistant/components/nws/__init__.py index 0e00c848970c..318ba687d308 100644 --- a/homeassistant/components/nws/__init__.py +++ b/homeassistant/components/nws/__init__.py @@ -1,10 +1,9 @@ """The National Weather Service integration.""" from __future__ import annotations -from collections.abc import Awaitable +from collections.abc import Awaitable, Callable import datetime import logging -from typing import Callable from pynws import SimpleNWS diff --git a/homeassistant/components/philips_js/__init__.py b/homeassistant/components/philips_js/__init__.py index 1006df699f42..79698ea4136c 100644 --- a/homeassistant/components/philips_js/__init__.py +++ b/homeassistant/components/philips_js/__init__.py @@ -2,9 +2,10 @@ from __future__ import annotations import asyncio +from collections.abc import Callable from datetime import timedelta import logging -from typing import Any, Callable +from typing import Any from haphilipsjs import ConnectionFailure, PhilipsTV diff --git a/homeassistant/components/shelly/entity.py b/homeassistant/components/shelly/entity.py index 13fd3aade3b9..f12633bd0e3e 100644 --- a/homeassistant/components/shelly/entity.py +++ b/homeassistant/components/shelly/entity.py @@ -2,9 +2,10 @@ from __future__ import annotations import asyncio +from collections.abc import Callable from dataclasses import dataclass import logging -from typing import Any, Callable, Final, cast +from typing import Any, Final, cast from aioshelly.block_device import Block import async_timeout diff --git a/homeassistant/components/shelly/logbook.py b/homeassistant/components/shelly/logbook.py index a1c8d5eceeef..d4278e3e98e2 100644 --- a/homeassistant/components/shelly/logbook.py +++ b/homeassistant/components/shelly/logbook.py @@ -1,7 +1,7 @@ """Describe Shelly logbook events.""" from __future__ import annotations -from typing import Callable +from collections.abc import Callable from homeassistant.const import ATTR_DEVICE_ID from homeassistant.core import HomeAssistant, callback diff --git a/homeassistant/components/sht31/sensor.py b/homeassistant/components/sht31/sensor.py index 1415c4856b62..2d7c81072f62 100644 --- a/homeassistant/components/sht31/sensor.py +++ b/homeassistant/components/sht31/sensor.py @@ -1,11 +1,11 @@ """Support for Sensirion SHT31 temperature and humidity sensor.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass from datetime import timedelta import logging import math -from typing import Callable from Adafruit_SHT31 import SHT31 import voluptuous as vol diff --git a/homeassistant/components/simplisafe/__init__.py b/homeassistant/components/simplisafe/__init__.py index 924cf398f643..4ba26f0adc7e 100644 --- a/homeassistant/components/simplisafe/__init__.py +++ b/homeassistant/components/simplisafe/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations import asyncio -from collections.abc import Awaitable -from typing import Callable, cast +from collections.abc import Awaitable, Callable +from typing import cast from uuid import UUID from simplipy import get_api diff --git a/homeassistant/components/starline/account.py b/homeassistant/components/starline/account.py index 8af9940370e6..9033375ce907 100644 --- a/homeassistant/components/starline/account.py +++ b/homeassistant/components/starline/account.py @@ -1,8 +1,9 @@ """StarLine Account.""" from __future__ import annotations +from collections.abc import Callable from datetime import datetime, timedelta -from typing import Any, Callable +from typing import Any from starline import StarlineApi, StarlineDevice diff --git a/homeassistant/components/starline/entity.py b/homeassistant/components/starline/entity.py index b48816e1a7cb..727960e5f465 100644 --- a/homeassistant/components/starline/entity.py +++ b/homeassistant/components/starline/entity.py @@ -1,7 +1,7 @@ """StarLine base entity.""" from __future__ import annotations -from typing import Callable +from collections.abc import Callable from homeassistant.helpers.entity import Entity diff --git a/homeassistant/components/stream/worker.py b/homeassistant/components/stream/worker.py index 314e4f33e80e..a576ff6d02bd 100644 --- a/homeassistant/components/stream/worker.py +++ b/homeassistant/components/stream/worker.py @@ -2,12 +2,12 @@ from __future__ import annotations from collections import defaultdict, deque -from collections.abc import Generator, Iterator, Mapping +from collections.abc import Callable, Generator, Iterator, Mapping import datetime from io import BytesIO import logging from threading import Event -from typing import Any, Callable, cast +from typing import Any, cast import av diff --git a/homeassistant/components/switcher_kis/utils.py b/homeassistant/components/switcher_kis/utils.py index b2cc45cf67c7..5a35be8aa955 100644 --- a/homeassistant/components/switcher_kis/utils.py +++ b/homeassistant/components/switcher_kis/utils.py @@ -2,8 +2,9 @@ from __future__ import annotations import asyncio +from collections.abc import Callable import logging -from typing import Any, Callable +from typing import Any from aioswitcher.bridge import SwitcherBase, SwitcherBridge diff --git a/homeassistant/components/system_health/__init__.py b/homeassistant/components/system_health/__init__.py index 651961c72acf..2683f6a2f3af 100644 --- a/homeassistant/components/system_health/__init__.py +++ b/homeassistant/components/system_health/__init__.py @@ -2,11 +2,10 @@ from __future__ import annotations import asyncio -from collections.abc import Awaitable +from collections.abc import Awaitable, Callable import dataclasses from datetime import datetime import logging -from typing import Callable import aiohttp import async_timeout diff --git a/homeassistant/components/template/__init__.py b/homeassistant/components/template/__init__.py index 3e34b9279715..9a0fa5a7320a 100644 --- a/homeassistant/components/template/__init__.py +++ b/homeassistant/components/template/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations import asyncio +from collections.abc import Callable import logging -from typing import Callable from homeassistant import config as conf_util from homeassistant.const import ( diff --git a/homeassistant/components/template/template_entity.py b/homeassistant/components/template/template_entity.py index 6bf889ebf025..42517b00d4a0 100644 --- a/homeassistant/components/template/template_entity.py +++ b/homeassistant/components/template/template_entity.py @@ -1,8 +1,9 @@ """TemplateEntity utility class.""" from __future__ import annotations +from collections.abc import Callable import logging -from typing import Any, Callable +from typing import Any import voluptuous as vol diff --git a/homeassistant/components/tradfri/base_class.py b/homeassistant/components/tradfri/base_class.py index 1e86be6c1a58..b0679a2a8ce5 100644 --- a/homeassistant/components/tradfri/base_class.py +++ b/homeassistant/components/tradfri/base_class.py @@ -1,9 +1,10 @@ """Base class for IKEA TRADFRI.""" from __future__ import annotations +from collections.abc import Callable from functools import wraps import logging -from typing import Any, Callable +from typing import Any from pytradfri.command import Command from pytradfri.device import Device diff --git a/homeassistant/components/tradfri/cover.py b/homeassistant/components/tradfri/cover.py index 5a6140ed5fce..7bcbf5af5e16 100644 --- a/homeassistant/components/tradfri/cover.py +++ b/homeassistant/components/tradfri/cover.py @@ -1,7 +1,8 @@ """Support for IKEA Tradfri covers.""" from __future__ import annotations -from typing import Any, Callable, cast +from collections.abc import Callable +from typing import Any, cast from pytradfri.command import Command diff --git a/homeassistant/components/tradfri/light.py b/homeassistant/components/tradfri/light.py index e4d7fb1fc4f3..c41bc55bcc87 100644 --- a/homeassistant/components/tradfri/light.py +++ b/homeassistant/components/tradfri/light.py @@ -1,7 +1,8 @@ """Support for IKEA Tradfri lights.""" from __future__ import annotations -from typing import Any, Callable, cast +from collections.abc import Callable +from typing import Any, cast from pytradfri.command import Command diff --git a/homeassistant/components/tradfri/sensor.py b/homeassistant/components/tradfri/sensor.py index 23b7ecc2fab1..f761aba5dddf 100644 --- a/homeassistant/components/tradfri/sensor.py +++ b/homeassistant/components/tradfri/sensor.py @@ -1,7 +1,8 @@ """Support for IKEA Tradfri sensors.""" from __future__ import annotations -from typing import Any, Callable, cast +from collections.abc import Callable +from typing import Any, cast from pytradfri.command import Command diff --git a/homeassistant/components/tradfri/switch.py b/homeassistant/components/tradfri/switch.py index 7366bf7a8985..b7051989265c 100644 --- a/homeassistant/components/tradfri/switch.py +++ b/homeassistant/components/tradfri/switch.py @@ -1,7 +1,8 @@ """Support for IKEA Tradfri switches.""" from __future__ import annotations -from typing import Any, Callable, cast +from collections.abc import Callable +from typing import Any, cast from pytradfri.command import Command diff --git a/homeassistant/components/vicare/__init__.py b/homeassistant/components/vicare/__init__.py index b811b9bbfb53..5d5c5548be17 100644 --- a/homeassistant/components/vicare/__init__.py +++ b/homeassistant/components/vicare/__init__.py @@ -1,10 +1,11 @@ """The ViCare integration.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass import enum import logging -from typing import Callable, Generic, TypeVar +from typing import Generic, TypeVar from PyViCare.PyViCareDevice import Device from PyViCare.PyViCareFuelCell import FuelCell diff --git a/homeassistant/components/websocket_api/connection.py b/homeassistant/components/websocket_api/connection.py index 0d3bd5fdf4d6..aec56fdfbf24 100644 --- a/homeassistant/components/websocket_api/connection.py +++ b/homeassistant/components/websocket_api/connection.py @@ -2,8 +2,8 @@ from __future__ import annotations import asyncio -from collections.abc import Hashable -from typing import TYPE_CHECKING, Any, Callable +from collections.abc import Callable, Hashable +from typing import TYPE_CHECKING, Any import voluptuous as vol diff --git a/homeassistant/components/websocket_api/decorators.py b/homeassistant/components/websocket_api/decorators.py index af762cf2d46b..eff82a8c71d2 100644 --- a/homeassistant/components/websocket_api/decorators.py +++ b/homeassistant/components/websocket_api/decorators.py @@ -2,8 +2,9 @@ from __future__ import annotations import asyncio +from collections.abc import Callable from functools import wraps -from typing import Any, Callable +from typing import Any import voluptuous as vol diff --git a/homeassistant/components/withings/common.py b/homeassistant/components/withings/common.py index 9d8d68c1927a..9e4beff8c38e 100644 --- a/homeassistant/components/withings/common.py +++ b/homeassistant/components/withings/common.py @@ -2,13 +2,14 @@ from __future__ import annotations import asyncio +from collections.abc import Callable from dataclasses import dataclass import datetime from datetime import timedelta from enum import Enum, IntEnum import logging import re -from typing import Any, Callable, Dict +from typing import Any, Dict from aiohttp.web import Response import requests diff --git a/homeassistant/components/xiaomi_miio/binary_sensor.py b/homeassistant/components/xiaomi_miio/binary_sensor.py index a91f06d11948..61c3a4fde618 100644 --- a/homeassistant/components/xiaomi_miio/binary_sensor.py +++ b/homeassistant/components/xiaomi_miio/binary_sensor.py @@ -1,9 +1,9 @@ """Support for Xiaomi Miio binary sensors.""" from __future__ import annotations +from collections.abc import Callable from dataclasses import dataclass from enum import Enum -from typing import Callable from homeassistant.components.binary_sensor import ( DEVICE_CLASS_CONNECTIVITY,