diff --git a/homeassistant/components/aemet/sensor.py b/homeassistant/components/aemet/sensor.py index de8e9aa4828..f7aa6b35893 100644 --- a/homeassistant/components/aemet/sensor.py +++ b/homeassistant/components/aemet/sensor.py @@ -262,7 +262,7 @@ class AbstractAemetSensor(CoordinatorEntity[WeatherUpdateCoordinator], SensorEnt unique_id, coordinator: WeatherUpdateCoordinator, description: SensorEntityDescription, - ): + ) -> None: """Initialize the sensor.""" super().__init__(coordinator) self.entity_description = description @@ -279,7 +279,7 @@ class AemetSensor(AbstractAemetSensor): unique_id_prefix, weather_coordinator: WeatherUpdateCoordinator, description: SensorEntityDescription, - ): + ) -> None: """Initialize the sensor.""" super().__init__( name=name, @@ -304,7 +304,7 @@ class AemetForecastSensor(AbstractAemetSensor): weather_coordinator: WeatherUpdateCoordinator, forecast_mode, description: SensorEntityDescription, - ): + ) -> None: """Initialize the sensor.""" super().__init__( name=name, diff --git a/homeassistant/components/aemet/weather.py b/homeassistant/components/aemet/weather.py index 3753d8e33ff..aba5a2781d0 100644 --- a/homeassistant/components/aemet/weather.py +++ b/homeassistant/components/aemet/weather.py @@ -102,7 +102,7 @@ class AemetWeather(CoordinatorEntity[WeatherUpdateCoordinator], WeatherEntity): unique_id, coordinator: WeatherUpdateCoordinator, forecast_mode, - ): + ) -> None: """Initialize the sensor.""" super().__init__(coordinator) self._forecast_mode = forecast_mode diff --git a/homeassistant/components/august/binary_sensor.py b/homeassistant/components/august/binary_sensor.py index 89e05c5057e..66b7d548125 100644 --- a/homeassistant/components/august/binary_sensor.py +++ b/homeassistant/components/august/binary_sensor.py @@ -195,7 +195,9 @@ class AugustDoorBinarySensor(AugustEntityMixin, BinarySensorEntity): _attr_device_class = BinarySensorDeviceClass.DOOR - def __init__(self, data, device, description: BinarySensorEntityDescription): + def __init__( + self, data, device, description: BinarySensorEntityDescription + ) -> None: """Initialize the sensor.""" super().__init__(data, device) self.entity_description = description @@ -235,7 +237,9 @@ class AugustDoorbellBinarySensor(AugustEntityMixin, BinarySensorEntity): entity_description: AugustBinarySensorEntityDescription - def __init__(self, data, device, description: AugustBinarySensorEntityDescription): + def __init__( + self, data, device, description: AugustBinarySensorEntityDescription + ) -> None: """Initialize the sensor.""" super().__init__(data, device) self.entity_description = description diff --git a/homeassistant/components/august/sensor.py b/homeassistant/components/august/sensor.py index af79cad459e..b908d68caa0 100644 --- a/homeassistant/components/august/sensor.py +++ b/homeassistant/components/august/sensor.py @@ -268,7 +268,7 @@ class AugustBatterySensor(AugustEntityMixin, SensorEntity, Generic[_T]): device, old_device, description: AugustSensorEntityDescription[_T], - ): + ) -> None: """Initialize the sensor.""" super().__init__(data, device) self.entity_description = description diff --git a/homeassistant/components/bbox/sensor.py b/homeassistant/components/bbox/sensor.py index 4cc77a4b780..6dcc89dca02 100644 --- a/homeassistant/components/bbox/sensor.py +++ b/homeassistant/components/bbox/sensor.py @@ -130,7 +130,7 @@ class BboxUptimeSensor(SensorEntity): _attr_attribution = ATTRIBUTION _attr_device_class = SensorDeviceClass.TIMESTAMP - def __init__(self, bbox_data, name, description: SensorEntityDescription): + def __init__(self, bbox_data, name, description: SensorEntityDescription) -> None: """Initialize the sensor.""" self.entity_description = description self._attr_name = f"{name} {description.name}" @@ -149,7 +149,7 @@ class BboxSensor(SensorEntity): _attr_attribution = ATTRIBUTION - def __init__(self, bbox_data, name, description: SensorEntityDescription): + def __init__(self, bbox_data, name, description: SensorEntityDescription) -> None: """Initialize the sensor.""" self.entity_description = description self._attr_name = f"{name} {description.name}" diff --git a/homeassistant/components/blink/binary_sensor.py b/homeassistant/components/blink/binary_sensor.py index ddcf58deb6f..7f11e9646d2 100644 --- a/homeassistant/components/blink/binary_sensor.py +++ b/homeassistant/components/blink/binary_sensor.py @@ -55,7 +55,9 @@ async def async_setup_entry( class BlinkBinarySensor(BinarySensorEntity): """Representation of a Blink binary sensor.""" - def __init__(self, data, camera, description: BinarySensorEntityDescription): + def __init__( + self, data, camera, description: BinarySensorEntityDescription + ) -> None: """Initialize the sensor.""" self.data = data self.entity_description = description diff --git a/homeassistant/components/blink/sensor.py b/homeassistant/components/blink/sensor.py index bc52f484243..34b7eb0d33d 100644 --- a/homeassistant/components/blink/sensor.py +++ b/homeassistant/components/blink/sensor.py @@ -53,7 +53,7 @@ async def async_setup_entry( class BlinkSensor(SensorEntity): """A Blink camera sensor.""" - def __init__(self, data, camera, description: SensorEntityDescription): + def __init__(self, data, camera, description: SensorEntityDescription) -> None: """Initialize sensors from Blink camera.""" self.entity_description = description self._attr_name = f"{DOMAIN} {camera} {description.name}" diff --git a/homeassistant/components/broadlink/sensor.py b/homeassistant/components/broadlink/sensor.py index 2527b48e29c..33f1badcc1b 100644 --- a/homeassistant/components/broadlink/sensor.py +++ b/homeassistant/components/broadlink/sensor.py @@ -114,7 +114,7 @@ class BroadlinkSensor(BroadlinkEntity, SensorEntity): _attr_has_entity_name = True - def __init__(self, device, description: SensorEntityDescription): + def __init__(self, device, description: SensorEntityDescription) -> None: """Initialize the sensor.""" super().__init__(device) self.entity_description = description diff --git a/homeassistant/components/buienradar/sensor.py b/homeassistant/components/buienradar/sensor.py index ae762efefe7..b7061abeab3 100644 --- a/homeassistant/components/buienradar/sensor.py +++ b/homeassistant/components/buienradar/sensor.py @@ -692,7 +692,9 @@ class BrSensor(SensorEntity): _attr_entity_registry_enabled_default = False _attr_should_poll = False - def __init__(self, client_name, coordinates, description: SensorEntityDescription): + def __init__( + self, client_name, coordinates, description: SensorEntityDescription + ) -> None: """Initialize the sensor.""" self.entity_description = description self._attr_name = f"{client_name} {description.name}" diff --git a/homeassistant/components/comed_hourly_pricing/sensor.py b/homeassistant/components/comed_hourly_pricing/sensor.py index 0e26b3406b8..3336f5b79f8 100644 --- a/homeassistant/components/comed_hourly_pricing/sensor.py +++ b/homeassistant/components/comed_hourly_pricing/sensor.py @@ -91,7 +91,9 @@ class ComedHourlyPricingSensor(SensorEntity): _attr_attribution = "Data provided by ComEd Hourly Pricing service" - def __init__(self, websession, offset, name, description: SensorEntityDescription): + def __init__( + self, websession, offset, name, description: SensorEntityDescription + ) -> None: """Initialize the sensor.""" self.entity_description = description self.websession = websession diff --git a/homeassistant/components/daikin/switch.py b/homeassistant/components/daikin/switch.py index a7c8b6549e4..68cd4fdc590 100644 --- a/homeassistant/components/daikin/switch.py +++ b/homeassistant/components/daikin/switch.py @@ -59,7 +59,7 @@ class DaikinZoneSwitch(SwitchEntity): _attr_icon = ZONE_ICON _attr_has_entity_name = True - def __init__(self, daikin_api: DaikinApi, zone_id): + def __init__(self, daikin_api: DaikinApi, zone_id) -> None: """Initialize the zone.""" self._api = daikin_api self._zone_id = zone_id diff --git a/homeassistant/components/darksky/sensor.py b/homeassistant/components/darksky/sensor.py index e912eb40115..ef1ef0466d4 100644 --- a/homeassistant/components/darksky/sensor.py +++ b/homeassistant/components/darksky/sensor.py @@ -651,7 +651,7 @@ class DarkSkySensor(SensorEntity): name, forecast_day=None, forecast_hour=None, - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self.forecast_data = forecast_data @@ -794,7 +794,7 @@ class DarkSkyAlertSensor(SensorEntity): def __init__( self, forecast_data, description: DarkskySensorEntityDescription, name - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self.forecast_data = forecast_data diff --git a/homeassistant/components/discogs/sensor.py b/homeassistant/components/discogs/sensor.py index 5e2d4bfa770..e6a46ac535f 100644 --- a/homeassistant/components/discogs/sensor.py +++ b/homeassistant/components/discogs/sensor.py @@ -106,7 +106,9 @@ class DiscogsSensor(SensorEntity): _attr_attribution = "Data provided by Discogs" - def __init__(self, discogs_data, name, description: SensorEntityDescription): + def __init__( + self, discogs_data, name, description: SensorEntityDescription + ) -> None: """Initialize the Discogs sensor.""" self.entity_description = description self._discogs_data = discogs_data diff --git a/homeassistant/components/dovado/sensor.py b/homeassistant/components/dovado/sensor.py index 92b35af9d51..f84261de44b 100644 --- a/homeassistant/components/dovado/sensor.py +++ b/homeassistant/components/dovado/sensor.py @@ -110,7 +110,7 @@ class DovadoSensor(SensorEntity): entity_description: DovadoSensorEntityDescription - def __init__(self, data, description: DovadoSensorEntityDescription): + def __init__(self, data, description: DovadoSensorEntityDescription) -> None: """Initialize the sensor.""" self.entity_description = description self._data = data diff --git a/homeassistant/components/dwd_weather_warnings/sensor.py b/homeassistant/components/dwd_weather_warnings/sensor.py index 30a258875d5..531eb1b3707 100644 --- a/homeassistant/components/dwd_weather_warnings/sensor.py +++ b/homeassistant/components/dwd_weather_warnings/sensor.py @@ -113,7 +113,7 @@ class DwdWeatherWarningsSensor(SensorEntity): api, name, description: SensorEntityDescription, - ): + ) -> None: """Initialize a DWD-Weather-Warnings sensor.""" self._api = api self.entity_description = description diff --git a/homeassistant/components/ebox/sensor.py b/homeassistant/components/ebox/sensor.py index 91510b3fbc0..aaa8c5ceb0c 100644 --- a/homeassistant/components/ebox/sensor.py +++ b/homeassistant/components/ebox/sensor.py @@ -188,7 +188,7 @@ class EBoxSensor(SensorEntity): ebox_data, description: SensorEntityDescription, name, - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self._attr_name = f"{name} {description.name}" diff --git a/homeassistant/components/ecobee/sensor.py b/homeassistant/components/ecobee/sensor.py index b9d61742838..90d4ba4202e 100644 --- a/homeassistant/components/ecobee/sensor.py +++ b/homeassistant/components/ecobee/sensor.py @@ -112,7 +112,7 @@ class EcobeeSensor(SensorEntity): sensor_name, sensor_index, description: EcobeeSensorEntityDescription, - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self.data = data diff --git a/homeassistant/components/econet/binary_sensor.py b/homeassistant/components/econet/binary_sensor.py index b869c3fb135..2a54a45eba2 100644 --- a/homeassistant/components/econet/binary_sensor.py +++ b/homeassistant/components/econet/binary_sensor.py @@ -60,7 +60,9 @@ async def async_setup_entry( class EcoNetBinarySensor(EcoNetEntity, BinarySensorEntity): """Define a Econet binary sensor.""" - def __init__(self, econet_device, description: BinarySensorEntityDescription): + def __init__( + self, econet_device, description: BinarySensorEntityDescription + ) -> None: """Initialize.""" super().__init__(econet_device) self.entity_description = description diff --git a/homeassistant/components/enocean/sensor.py b/homeassistant/components/enocean/sensor.py index 702b721ab09..ae2110b3174 100644 --- a/homeassistant/components/enocean/sensor.py +++ b/homeassistant/components/enocean/sensor.py @@ -154,7 +154,9 @@ def setup_platform( class EnOceanSensor(EnOceanEntity, RestoreEntity, SensorEntity): """Representation of an EnOcean sensor device such as a power meter.""" - def __init__(self, dev_id, dev_name, description: EnOceanSensorEntityDescription): + def __init__( + self, dev_id, dev_name, description: EnOceanSensorEntityDescription + ) -> None: """Initialize the EnOcean sensor device.""" super().__init__(dev_id, dev_name) self.entity_description = description @@ -223,7 +225,7 @@ class EnOceanTemperatureSensor(EnOceanSensor): scale_max, range_from, range_to, - ): + ) -> None: """Initialize the EnOcean temperature sensor device.""" super().__init__(dev_id, dev_name, description) self._scale_min = scale_min diff --git a/homeassistant/components/faa_delays/binary_sensor.py b/homeassistant/components/faa_delays/binary_sensor.py index f085651c460..bc09a604cd6 100644 --- a/homeassistant/components/faa_delays/binary_sensor.py +++ b/homeassistant/components/faa_delays/binary_sensor.py @@ -34,7 +34,7 @@ class FAABinarySensor(CoordinatorEntity, BinarySensorEntity): def __init__( self, coordinator, entry_id, description: BinarySensorEntityDescription - ): + ) -> None: """Initialize the sensor.""" super().__init__(coordinator) self.entity_description = description diff --git a/homeassistant/components/fido/sensor.py b/homeassistant/components/fido/sensor.py index 0d2d6d3a0de..9112351ce06 100644 --- a/homeassistant/components/fido/sensor.py +++ b/homeassistant/components/fido/sensor.py @@ -214,7 +214,9 @@ async def async_setup_platform( class FidoSensor(SensorEntity): """Implementation of a Fido sensor.""" - def __init__(self, fido_data, name, number, description: SensorEntityDescription): + def __init__( + self, fido_data, name, number, description: SensorEntityDescription + ) -> None: """Initialize the sensor.""" self.entity_description = description self.fido_data = fido_data diff --git a/homeassistant/components/fleetgo/device_tracker.py b/homeassistant/components/fleetgo/device_tracker.py index c901ccce3e7..e736419ce29 100644 --- a/homeassistant/components/fleetgo/device_tracker.py +++ b/homeassistant/components/fleetgo/device_tracker.py @@ -53,7 +53,7 @@ def setup_scanner( class FleetGoDeviceScanner: """Define a scanner for the FleetGO platform.""" - def __init__(self, config, see: SeeCallback): + def __init__(self, config, see: SeeCallback) -> None: """Initialize FleetGoDeviceScanner.""" self._include = config.get(CONF_INCLUDE) self._see = see diff --git a/homeassistant/components/growatt_server/sensor.py b/homeassistant/components/growatt_server/sensor.py index e84ecb0e8b8..f4150068399 100644 --- a/homeassistant/components/growatt_server/sensor.py +++ b/homeassistant/components/growatt_server/sensor.py @@ -142,7 +142,7 @@ class GrowattInverter(SensorEntity): def __init__( self, probe, name, unique_id, description: GrowattSensorEntityDescription - ): + ) -> None: """Initialize a PVOutput sensor.""" self.probe = probe self.entity_description = description diff --git a/homeassistant/components/heos/__init__.py b/homeassistant/components/heos/__init__.py index 1298d6e5d97..7aff107d8c5 100644 --- a/homeassistant/components/heos/__init__.py +++ b/homeassistant/components/heos/__init__.py @@ -392,7 +392,7 @@ class SourceManager: *, retry_delay: int = COMMAND_RETRY_DELAY, max_retry_attempts: int = COMMAND_RETRY_ATTEMPTS, - ): + ) -> None: """Init input manager.""" self.retry_delay = retry_delay self.max_retry_attempts = max_retry_attempts diff --git a/homeassistant/components/hydrawise/__init__.py b/homeassistant/components/hydrawise/__init__.py index 7074f86e4a8..a99c19cd46a 100644 --- a/homeassistant/components/hydrawise/__init__.py +++ b/homeassistant/components/hydrawise/__init__.py @@ -89,7 +89,7 @@ class HydrawiseEntity(Entity): _attr_attribution = "Data provided by hydrawise.com" - def __init__(self, data, description: EntityDescription): + def __init__(self, data, description: EntityDescription) -> None: """Initialize the Hydrawise entity.""" self.entity_description = description self.data = data diff --git a/homeassistant/components/hydrawise/switch.py b/homeassistant/components/hydrawise/switch.py index ed4fa11317e..cc12638f329 100644 --- a/homeassistant/components/hydrawise/switch.py +++ b/homeassistant/components/hydrawise/switch.py @@ -81,7 +81,7 @@ class HydrawiseSwitch(HydrawiseEntity, SwitchEntity): def __init__( self, data, description: SwitchEntityDescription, default_watering_timer - ): + ) -> None: """Initialize a switch for Hydrawise device.""" super().__init__(data, description) self._default_watering_timer = default_watering_timer diff --git a/homeassistant/components/ios/sensor.py b/homeassistant/components/ios/sensor.py index 397d829f36d..f4dab9e301b 100644 --- a/homeassistant/components/ios/sensor.py +++ b/homeassistant/components/ios/sensor.py @@ -60,7 +60,9 @@ class IOSSensor(SensorEntity): _attr_should_poll = False - def __init__(self, device_name, device, description: SensorEntityDescription): + def __init__( + self, device_name, device, description: SensorEntityDescription + ) -> None: """Initialize the sensor.""" self.entity_description = description self._device = device diff --git a/homeassistant/components/iperf3/sensor.py b/homeassistant/components/iperf3/sensor.py index 1b68709b934..e39d1e1d864 100644 --- a/homeassistant/components/iperf3/sensor.py +++ b/homeassistant/components/iperf3/sensor.py @@ -41,7 +41,7 @@ class Iperf3Sensor(RestoreEntity, SensorEntity): _attr_attribution = "Data retrieved using Iperf3" _attr_should_poll = False - def __init__(self, iperf3_data, description: SensorEntityDescription): + def __init__(self, iperf3_data, description: SensorEntityDescription) -> None: """Initialize the sensor.""" self.entity_description = description self._iperf3_data = iperf3_data diff --git a/homeassistant/components/ipma/weather.py b/homeassistant/components/ipma/weather.py index 4387e2d8e1e..8e46bf27d55 100644 --- a/homeassistant/components/ipma/weather.py +++ b/homeassistant/components/ipma/weather.py @@ -121,7 +121,7 @@ class IPMAWeather(WeatherEntity): _attr_attribution = ATTRIBUTION - def __init__(self, location: Location, api: IPMA_API, config): + def __init__(self, location: Location, api: IPMA_API, config) -> None: """Initialise the platform with a data instance and station name.""" self._api = api self._location_name = config.get(CONF_NAME, location.name) diff --git a/homeassistant/components/juicenet/sensor.py b/homeassistant/components/juicenet/sensor.py index e87c752962b..fdc40211d77 100644 --- a/homeassistant/components/juicenet/sensor.py +++ b/homeassistant/components/juicenet/sensor.py @@ -91,7 +91,9 @@ async def async_setup_entry( class JuiceNetSensorDevice(JuiceNetDevice, SensorEntity): """Implementation of a JuiceNet sensor.""" - def __init__(self, device, coordinator, description: SensorEntityDescription): + def __init__( + self, device, coordinator, description: SensorEntityDescription + ) -> None: """Initialise the sensor.""" super().__init__(device, description.key, coordinator) self.entity_description = description diff --git a/homeassistant/components/kaiterra/sensor.py b/homeassistant/components/kaiterra/sensor.py index 63a73a1157a..ab487aa1a25 100644 --- a/homeassistant/components/kaiterra/sensor.py +++ b/homeassistant/components/kaiterra/sensor.py @@ -71,7 +71,7 @@ class KaiterraSensor(SensorEntity): def __init__( self, api, name, device_id, description: KaiterraSensorEntityDescription - ): + ) -> None: """Initialize the sensor.""" self._api = api self._device_id = device_id diff --git a/homeassistant/components/konnected/sensor.py b/homeassistant/components/konnected/sensor.py index 89436913606..749e1d5fd82 100644 --- a/homeassistant/components/konnected/sensor.py +++ b/homeassistant/components/konnected/sensor.py @@ -102,7 +102,7 @@ class KonnectedSensor(SensorEntity): description: SensorEntityDescription, addr=None, initial_state=None, - ): + ) -> None: """Initialize the entity for a single sensor_type.""" self.entity_description = description self._addr = addr diff --git a/homeassistant/components/litejet/scene.py b/homeassistant/components/litejet/scene.py index 01dfc0a3ccd..762e8e543d5 100644 --- a/homeassistant/components/litejet/scene.py +++ b/homeassistant/components/litejet/scene.py @@ -37,7 +37,9 @@ async def async_setup_entry( class LiteJetScene(Scene): """Representation of a single LiteJet scene.""" - def __init__(self, entry_id, lj: LiteJet, i, name): # pylint: disable=invalid-name + def __init__( + self, entry_id, lj: LiteJet, i, name # pylint: disable=invalid-name + ) -> None: """Initialize the scene.""" self._lj = lj self._index = i diff --git a/homeassistant/components/logi_circle/sensor.py b/homeassistant/components/logi_circle/sensor.py index b31a7bda2b2..7d4697adb64 100644 --- a/homeassistant/components/logi_circle/sensor.py +++ b/homeassistant/components/logi_circle/sensor.py @@ -59,7 +59,7 @@ class LogiSensor(SensorEntity): _attr_attribution = ATTRIBUTION - def __init__(self, camera, time_zone, description: SensorEntityDescription): + def __init__(self, camera, time_zone, description: SensorEntityDescription) -> None: """Initialize a sensor for Logi Circle camera.""" self.entity_description = description self._camera = camera diff --git a/homeassistant/components/magicseaweed/sensor.py b/homeassistant/components/magicseaweed/sensor.py index 3c3eb939181..aa59553ef81 100644 --- a/homeassistant/components/magicseaweed/sensor.py +++ b/homeassistant/components/magicseaweed/sensor.py @@ -146,7 +146,7 @@ class MagicSeaweedSensor(SensorEntity): unit_system, description: SensorEntityDescription, hour=None, - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self.client_name = name diff --git a/homeassistant/components/nightscout/sensor.py b/homeassistant/components/nightscout/sensor.py index e8aaa11f23d..795e7b17a16 100644 --- a/homeassistant/components/nightscout/sensor.py +++ b/homeassistant/components/nightscout/sensor.py @@ -37,7 +37,7 @@ async def async_setup_entry( class NightscoutSensor(SensorEntity): """Implementation of a Nightscout sensor.""" - def __init__(self, api: NightscoutAPI, name, unique_id): + def __init__(self, api: NightscoutAPI, name, unique_id) -> None: """Initialize the Nightscout sensor.""" self.api = api self._attr_unique_id = unique_id diff --git a/homeassistant/components/nobo_hub/climate.py b/homeassistant/components/nobo_hub/climate.py index 6e4cf13c986..7cb69dfb79a 100644 --- a/homeassistant/components/nobo_hub/climate.py +++ b/homeassistant/components/nobo_hub/climate.py @@ -85,7 +85,7 @@ class NoboZone(ClimateEntity): _attr_target_temperature_step = 1 # Need to poll to get preset change when in HVACMode.AUTO, so can't set _attr_should_poll = False - def __init__(self, zone_id, hub: nobo, override_type): + def __init__(self, zone_id, hub: nobo, override_type) -> None: """Initialize the climate device.""" self._id = zone_id self._nobo = hub diff --git a/homeassistant/components/ombi/sensor.py b/homeassistant/components/ombi/sensor.py index 90410ea8da2..1ab4b170e00 100644 --- a/homeassistant/components/ombi/sensor.py +++ b/homeassistant/components/ombi/sensor.py @@ -38,7 +38,7 @@ def setup_platform( class OmbiSensor(SensorEntity): """Representation of an Ombi sensor.""" - def __init__(self, ombi, description: SensorEntityDescription): + def __init__(self, ombi, description: SensorEntityDescription) -> None: """Initialize the sensor.""" self.entity_description = description self._ombi = ombi diff --git a/homeassistant/components/onvif/sensor.py b/homeassistant/components/onvif/sensor.py index 5f63f9b7132..2fb7402be28 100644 --- a/homeassistant/components/onvif/sensor.py +++ b/homeassistant/components/onvif/sensor.py @@ -55,7 +55,9 @@ class ONVIFSensor(ONVIFBaseEntity, RestoreSensor): _attr_should_poll = False - def __init__(self, uid, device: ONVIFDevice, entry: er.RegistryEntry | None = None): + def __init__( + self, uid, device: ONVIFDevice, entry: er.RegistryEntry | None = None + ) -> None: """Initialize the ONVIF binary sensor.""" self._attr_unique_id = uid if entry is not None: diff --git a/homeassistant/components/openevse/sensor.py b/homeassistant/components/openevse/sensor.py index d7a47b97594..aafda0d038b 100644 --- a/homeassistant/components/openevse/sensor.py +++ b/homeassistant/components/openevse/sensor.py @@ -113,7 +113,7 @@ def setup_platform( class OpenEVSESensor(SensorEntity): """Implementation of an OpenEVSE sensor.""" - def __init__(self, charger, description: SensorEntityDescription): + def __init__(self, charger, description: SensorEntityDescription) -> None: """Initialize the sensor.""" self.entity_description = description self.charger = charger diff --git a/homeassistant/components/point/sensor.py b/homeassistant/components/point/sensor.py index cba990b60a6..34571c801a6 100644 --- a/homeassistant/components/point/sensor.py +++ b/homeassistant/components/point/sensor.py @@ -89,7 +89,7 @@ class MinutPointSensor(MinutPointEntity, SensorEntity): def __init__( self, point_client, device_id, description: MinutPointSensorEntityDescription - ): + ) -> None: """Initialize the sensor.""" super().__init__(point_client, device_id, description.device_class) self.entity_description = description diff --git a/homeassistant/components/poolsense/__init__.py b/homeassistant/components/poolsense/__init__.py index 3652883b0f7..312a3b4be58 100644 --- a/homeassistant/components/poolsense/__init__.py +++ b/homeassistant/components/poolsense/__init__.py @@ -64,7 +64,7 @@ class PoolSenseEntity(CoordinatorEntity): _attr_attribution = ATTRIBUTION - def __init__(self, coordinator, email, description: EntityDescription): + def __init__(self, coordinator, email, description: EntityDescription) -> None: """Initialize poolsense sensor.""" super().__init__(coordinator) self.entity_description = description diff --git a/homeassistant/components/progettihwsw/binary_sensor.py b/homeassistant/components/progettihwsw/binary_sensor.py index 6dcc9250259..058d76cdf05 100644 --- a/homeassistant/components/progettihwsw/binary_sensor.py +++ b/homeassistant/components/progettihwsw/binary_sensor.py @@ -59,7 +59,7 @@ async def async_setup_entry( class ProgettihwswBinarySensor(CoordinatorEntity, BinarySensorEntity): """Represent a binary sensor.""" - def __init__(self, coordinator, name, sensor: Input): + def __init__(self, coordinator, name, sensor: Input) -> None: """Set initializing values.""" super().__init__(coordinator) self._name = name diff --git a/homeassistant/components/progettihwsw/switch.py b/homeassistant/components/progettihwsw/switch.py index 0aab943e385..956848a6594 100644 --- a/homeassistant/components/progettihwsw/switch.py +++ b/homeassistant/components/progettihwsw/switch.py @@ -60,7 +60,7 @@ async def async_setup_entry( class ProgettihwswSwitch(CoordinatorEntity, SwitchEntity): """Represent a switch entity.""" - def __init__(self, coordinator, name, switch: Relay): + def __init__(self, coordinator, name, switch: Relay) -> None: """Initialize the values.""" super().__init__(coordinator) self._switch = switch diff --git a/homeassistant/components/proxmoxve/__init__.py b/homeassistant/components/proxmoxve/__init__.py index 44a74337998..8e8842abf47 100644 --- a/homeassistant/components/proxmoxve/__init__.py +++ b/homeassistant/components/proxmoxve/__init__.py @@ -256,7 +256,7 @@ class ProxmoxEntity(CoordinatorEntity): host_name, node_name, vm_id=None, - ): + ) -> None: """Initialize the Proxmox entity.""" super().__init__(coordinator) diff --git a/homeassistant/components/proxmoxve/binary_sensor.py b/homeassistant/components/proxmoxve/binary_sensor.py index fdc10eda2dd..9bb78d46ea7 100644 --- a/homeassistant/components/proxmoxve/binary_sensor.py +++ b/homeassistant/components/proxmoxve/binary_sensor.py @@ -78,7 +78,7 @@ class ProxmoxBinarySensor(ProxmoxEntity, BinarySensorEntity): host_name, node_name, vm_id, - ): + ) -> None: """Create the binary sensor for vms or containers.""" super().__init__( coordinator, unique_id, name, icon, host_name, node_name, vm_id diff --git a/homeassistant/components/pyload/sensor.py b/homeassistant/components/pyload/sensor.py index 53762c5df35..35e32d510ca 100644 --- a/homeassistant/components/pyload/sensor.py +++ b/homeassistant/components/pyload/sensor.py @@ -102,7 +102,7 @@ class PyLoadSensor(SensorEntity): def __init__( self, api: PyLoadAPI, sensor_type: SensorEntityDescription, client_name - ): + ) -> None: """Initialize a new pyLoad sensor.""" self._attr_name = f"{client_name} {sensor_type.name}" self.type = sensor_type.key diff --git a/homeassistant/components/qbittorrent/sensor.py b/homeassistant/components/qbittorrent/sensor.py index ff37d4f59dd..14bc0eb2ed9 100644 --- a/homeassistant/components/qbittorrent/sensor.py +++ b/homeassistant/components/qbittorrent/sensor.py @@ -107,7 +107,7 @@ class QBittorrentSensor(SensorEntity): qbittorrent_client, client_name, exception, - ): + ) -> None: """Initialize the qBittorrent sensor.""" self.entity_description = description self.client = qbittorrent_client diff --git a/homeassistant/components/qnap/sensor.py b/homeassistant/components/qnap/sensor.py index 378ed165f83..66fc5631718 100644 --- a/homeassistant/components/qnap/sensor.py +++ b/homeassistant/components/qnap/sensor.py @@ -319,7 +319,9 @@ class QNAPStatsAPI: class QNAPSensor(SensorEntity): """Base class for a QNAP sensor.""" - def __init__(self, api, description: SensorEntityDescription, monitor_device=None): + def __init__( + self, api, description: SensorEntityDescription, monitor_device=None + ) -> None: """Initialize the sensor.""" self.entity_description = description self.monitor_device = monitor_device diff --git a/homeassistant/components/raspyrfm/switch.py b/homeassistant/components/raspyrfm/switch.py index 6bf097b9f54..77360c6d224 100644 --- a/homeassistant/components/raspyrfm/switch.py +++ b/homeassistant/components/raspyrfm/switch.py @@ -98,7 +98,7 @@ class RaspyRFMSwitch(SwitchEntity): _attr_should_poll = False - def __init__(self, raspyrfm_client, name: str, gateway, controlunit): + def __init__(self, raspyrfm_client, name: str, gateway, controlunit) -> None: """Initialize the switch.""" self._raspyrfm_client = raspyrfm_client diff --git a/homeassistant/components/reddit/sensor.py b/homeassistant/components/reddit/sensor.py index 0ae53ca8610..43550658ac3 100644 --- a/homeassistant/components/reddit/sensor.py +++ b/homeassistant/components/reddit/sensor.py @@ -94,7 +94,7 @@ def setup_platform( class RedditSensor(SensorEntity): """Representation of a Reddit sensor.""" - def __init__(self, reddit, subreddit: str, limit: int, sort_by: str): + def __init__(self, reddit, subreddit: str, limit: int, sort_by: str) -> None: """Initialize the Reddit sensor.""" self._reddit = reddit self._subreddit = subreddit diff --git a/homeassistant/components/repetier/sensor.py b/homeassistant/components/repetier/sensor.py index f3341cf5e61..24c97c74b0f 100644 --- a/homeassistant/components/repetier/sensor.py +++ b/homeassistant/components/repetier/sensor.py @@ -69,7 +69,7 @@ class RepetierSensor(SensorEntity): name, printer_id, description: RepetierSensorEntityDescription, - ): + ) -> None: """Init new sensor.""" self.entity_description = description self._api = api diff --git a/homeassistant/components/ring/binary_sensor.py b/homeassistant/components/ring/binary_sensor.py index e7463c6474e..06872cc7338 100644 --- a/homeassistant/components/ring/binary_sensor.py +++ b/homeassistant/components/ring/binary_sensor.py @@ -80,7 +80,7 @@ class RingBinarySensor(RingEntityMixin, BinarySensorEntity): ring, device, description: RingBinarySensorEntityDescription, - ): + ) -> None: """Initialize a sensor for Ring device.""" super().__init__(config_entry_id, device) self.entity_description = description diff --git a/homeassistant/components/ring/sensor.py b/homeassistant/components/ring/sensor.py index c53f26a0e99..027eccb1c3d 100644 --- a/homeassistant/components/ring/sensor.py +++ b/homeassistant/components/ring/sensor.py @@ -49,7 +49,7 @@ class RingSensor(RingEntityMixin, SensorEntity): config_entry_id, device, description: RingSensorEntityDescription, - ): + ) -> None: """Initialize a sensor for Ring device.""" super().__init__(config_entry_id, device) self.entity_description = description diff --git a/homeassistant/components/rova/sensor.py b/homeassistant/components/rova/sensor.py index 26f6d67e697..21effd3da3a 100644 --- a/homeassistant/components/rova/sensor.py +++ b/homeassistant/components/rova/sensor.py @@ -109,7 +109,7 @@ class RovaSensor(SensorEntity): def __init__( self, platform_name, description: SensorEntityDescription, data_service - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self.data_service = data_service diff --git a/homeassistant/components/rtorrent/sensor.py b/homeassistant/components/rtorrent/sensor.py index e9c7aa89ffe..2ef6786153a 100644 --- a/homeassistant/components/rtorrent/sensor.py +++ b/homeassistant/components/rtorrent/sensor.py @@ -130,7 +130,7 @@ class RTorrentSensor(SensorEntity): def __init__( self, rtorrent_client, client_name, description: SensorEntityDescription - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self.client = rtorrent_client diff --git a/homeassistant/components/sabnzbd/sensor.py b/homeassistant/components/sabnzbd/sensor.py index a29e1e46abd..1d85fcf0243 100644 --- a/homeassistant/components/sabnzbd/sensor.py +++ b/homeassistant/components/sabnzbd/sensor.py @@ -160,7 +160,7 @@ class SabnzbdSensor(SensorEntity): client_name, description: SabnzbdSensorEntityDescription, entry_id, - ): + ) -> None: """Initialize the sensor.""" self._attr_unique_id = f"{entry_id}_{description.key}" diff --git a/homeassistant/components/smappee/sensor.py b/homeassistant/components/smappee/sensor.py index 951aab1bde1..d39f173d76b 100644 --- a/homeassistant/components/smappee/sensor.py +++ b/homeassistant/components/smappee/sensor.py @@ -336,7 +336,7 @@ class SmappeeSensor(SensorEntity): smappee_base, service_location, description: SmappeeSensorEntityDescription, - ): + ) -> None: """Initialize the Smappee sensor.""" self.entity_description = description self._smappee_base = smappee_base diff --git a/homeassistant/components/smartthings/__init__.py b/homeassistant/components/smartthings/__init__.py index 4f0c3aae2aa..4127cd5deb5 100644 --- a/homeassistant/components/smartthings/__init__.py +++ b/homeassistant/components/smartthings/__init__.py @@ -279,7 +279,7 @@ class DeviceBroker: smart_app, devices: Iterable, scenes: Iterable, - ): + ) -> None: """Create a new instance of the DeviceBroker.""" self._hass = hass self._entry = entry diff --git a/homeassistant/components/smarttub/entity.py b/homeassistant/components/smarttub/entity.py index 45f4556398c..0c935d77b5d 100644 --- a/homeassistant/components/smarttub/entity.py +++ b/homeassistant/components/smarttub/entity.py @@ -16,7 +16,7 @@ class SmartTubEntity(CoordinatorEntity): def __init__( self, coordinator: DataUpdateCoordinator, spa: smarttub.Spa, entity_name - ): + ) -> None: """Initialize the entity. Given a spa id and a short name for the entity, we provide basic device diff --git a/homeassistant/components/smarttub/switch.py b/homeassistant/components/smarttub/switch.py index b9afe94c06b..d01b92c2186 100644 --- a/homeassistant/components/smarttub/switch.py +++ b/homeassistant/components/smarttub/switch.py @@ -33,7 +33,7 @@ async def async_setup_entry( class SmartTubPump(SmartTubEntity, SwitchEntity): """A pump on a spa.""" - def __init__(self, coordinator, pump: SpaPump): + def __init__(self, coordinator, pump: SpaPump) -> None: """Initialize the entity.""" super().__init__(coordinator, pump.spa, "pump") self.pump_id = pump.id diff --git a/homeassistant/components/solaredge_local/sensor.py b/homeassistant/components/solaredge_local/sensor.py index 29c7f1ee6f3..35e5d758433 100644 --- a/homeassistant/components/solaredge_local/sensor.py +++ b/homeassistant/components/solaredge_local/sensor.py @@ -278,7 +278,7 @@ class SolarEdgeSensor(SensorEntity): platform_name, data, description: SolarEdgeLocalSensorEntityDescription, - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self._platform_name = platform_name diff --git a/homeassistant/components/startca/sensor.py b/homeassistant/components/startca/sensor.py index bf05b3a2210..3334afded00 100644 --- a/homeassistant/components/startca/sensor.py +++ b/homeassistant/components/startca/sensor.py @@ -168,7 +168,7 @@ async def async_setup_platform( class StartcaSensor(SensorEntity): """Representation of Start.ca Bandwidth sensor.""" - def __init__(self, startcadata, name, description: SensorEntityDescription): + def __init__(self, startcadata, name, description: SensorEntityDescription) -> None: """Initialize the sensor.""" self.entity_description = description self.startcadata = startcadata diff --git a/homeassistant/components/thinkingcleaner/sensor.py b/homeassistant/components/thinkingcleaner/sensor.py index 8b0d30d13ed..b56c9f61135 100644 --- a/homeassistant/components/thinkingcleaner/sensor.py +++ b/homeassistant/components/thinkingcleaner/sensor.py @@ -99,7 +99,9 @@ def setup_platform( class ThinkingCleanerSensor(SensorEntity): """Representation of a ThinkingCleaner Sensor.""" - def __init__(self, tc_object, update_devices, description: SensorEntityDescription): + def __init__( + self, tc_object, update_devices, description: SensorEntityDescription + ) -> None: """Initialize the ThinkingCleaner.""" self.entity_description = description self._tc_object = tc_object diff --git a/homeassistant/components/thinkingcleaner/switch.py b/homeassistant/components/thinkingcleaner/switch.py index 66d2ab02e93..1befc53ffff 100644 --- a/homeassistant/components/thinkingcleaner/switch.py +++ b/homeassistant/components/thinkingcleaner/switch.py @@ -75,7 +75,9 @@ def setup_platform( class ThinkingCleanerSwitch(SwitchEntity): """ThinkingCleaner Switch (dock, clean, find me).""" - def __init__(self, tc_object, update_devices, description: SwitchEntityDescription): + def __init__( + self, tc_object, update_devices, description: SwitchEntityDescription + ) -> None: """Initialize the ThinkingCleaner.""" self.entity_description = description diff --git a/homeassistant/components/totalconnect/alarm_control_panel.py b/homeassistant/components/totalconnect/alarm_control_panel.py index c6433fb71a4..186f6805b7f 100644 --- a/homeassistant/components/totalconnect/alarm_control_panel.py +++ b/homeassistant/components/totalconnect/alarm_control_panel.py @@ -86,7 +86,7 @@ class TotalConnectAlarm( name, location_id, partition_id, - ): + ) -> None: """Initialize the TotalConnect status.""" super().__init__(coordinator) self._location_id = location_id diff --git a/homeassistant/components/travisci/sensor.py b/homeassistant/components/travisci/sensor.py index b33f7315d17..ec62da37653 100644 --- a/homeassistant/components/travisci/sensor.py +++ b/homeassistant/components/travisci/sensor.py @@ -141,7 +141,7 @@ class TravisCISensor(SensorEntity): def __init__( self, data, repo_name, user, branch, description: SensorEntityDescription - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self._build = None diff --git a/homeassistant/components/vicare/binary_sensor.py b/homeassistant/components/vicare/binary_sensor.py index 3f54e5bd7e7..385b64e845f 100644 --- a/homeassistant/components/vicare/binary_sensor.py +++ b/homeassistant/components/vicare/binary_sensor.py @@ -189,7 +189,7 @@ class ViCareBinarySensor(BinarySensorEntity): def __init__( self, name, api, device_config, description: ViCareBinarySensorEntityDescription - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self._attr_name = name diff --git a/homeassistant/components/vicare/button.py b/homeassistant/components/vicare/button.py index 95be680f957..8a1fba539af 100644 --- a/homeassistant/components/vicare/button.py +++ b/homeassistant/components/vicare/button.py @@ -98,7 +98,7 @@ class ViCareButton(ButtonEntity): def __init__( self, name, api, device_config, description: ViCareButtonEntityDescription - ): + ) -> None: """Initialize the button.""" self.entity_description = description self._device_config = device_config diff --git a/homeassistant/components/vicare/sensor.py b/homeassistant/components/vicare/sensor.py index da1119711a4..43edf1a0cef 100644 --- a/homeassistant/components/vicare/sensor.py +++ b/homeassistant/components/vicare/sensor.py @@ -659,7 +659,7 @@ class ViCareSensor(SensorEntity): def __init__( self, name, api, device_config, description: ViCareSensorEntityDescription - ): + ) -> None: """Initialize the sensor.""" self.entity_description = description self._attr_name = name diff --git a/homeassistant/components/vilfo/sensor.py b/homeassistant/components/vilfo/sensor.py index c41e61d099e..b6339cea0d6 100644 --- a/homeassistant/components/vilfo/sensor.py +++ b/homeassistant/components/vilfo/sensor.py @@ -32,7 +32,7 @@ class VilfoRouterSensor(SensorEntity): entity_description: VilfoSensorEntityDescription - def __init__(self, api, description: VilfoSensorEntityDescription): + def __init__(self, api, description: VilfoSensorEntityDescription) -> None: """Initialize.""" self.entity_description = description self.api = api diff --git a/homeassistant/components/vultr/sensor.py b/homeassistant/components/vultr/sensor.py index 3710bd959f3..a77fab62bd4 100644 --- a/homeassistant/components/vultr/sensor.py +++ b/homeassistant/components/vultr/sensor.py @@ -84,7 +84,9 @@ def setup_platform( class VultrSensor(SensorEntity): """Representation of a Vultr subscription sensor.""" - def __init__(self, vultr, subscription, name, description: SensorEntityDescription): + def __init__( + self, vultr, subscription, name, description: SensorEntityDescription + ) -> None: """Initialize a new Vultr sensor.""" self.entity_description = description self._vultr = vultr diff --git a/homeassistant/components/wirelesstag/switch.py b/homeassistant/components/wirelesstag/switch.py index 9829cffd2b5..26c7d9384a6 100644 --- a/homeassistant/components/wirelesstag/switch.py +++ b/homeassistant/components/wirelesstag/switch.py @@ -77,7 +77,7 @@ def setup_platform( class WirelessTagSwitch(WirelessTagBaseSensor, SwitchEntity): """A switch implementation for Wireless Sensor Tags.""" - def __init__(self, api, tag, description: SwitchEntityDescription): + def __init__(self, api, tag, description: SwitchEntityDescription) -> None: """Initialize a switch for Wireless Sensor Tag.""" super().__init__(api, tag) self.entity_description = description diff --git a/homeassistant/components/wolflink/sensor.py b/homeassistant/components/wolflink/sensor.py index 3da12b65d5f..60883a0acf5 100644 --- a/homeassistant/components/wolflink/sensor.py +++ b/homeassistant/components/wolflink/sensor.py @@ -53,7 +53,7 @@ async def async_setup_entry( class WolfLinkSensor(CoordinatorEntity, SensorEntity): """Base class for all Wolf entities.""" - def __init__(self, coordinator, wolf_object: Parameter, device_id): + def __init__(self, coordinator, wolf_object: Parameter, device_id) -> None: """Initialize.""" super().__init__(coordinator) self.wolf_object = wolf_object diff --git a/homeassistant/components/xiaomi_miio/vacuum.py b/homeassistant/components/xiaomi_miio/vacuum.py index 3d6ada7481f..10fd1f2406b 100644 --- a/homeassistant/components/xiaomi_miio/vacuum.py +++ b/homeassistant/components/xiaomi_miio/vacuum.py @@ -206,7 +206,7 @@ class MiroboVacuum( entry, unique_id, coordinator: DataUpdateCoordinator[VacuumCoordinatorData], - ): + ) -> None: """Initialize the Xiaomi vacuum cleaner robot handler.""" super().__init__(device, entry, unique_id, coordinator) self._state: str | None = None diff --git a/homeassistant/components/yandex_transport/sensor.py b/homeassistant/components/yandex_transport/sensor.py index fe27ddcdbbe..d3e7e48815c 100644 --- a/homeassistant/components/yandex_transport/sensor.py +++ b/homeassistant/components/yandex_transport/sensor.py @@ -71,7 +71,7 @@ class DiscoverYandexTransport(SensorEntity): _attr_attribution = "Data provided by maps.yandex.ru" - def __init__(self, requester: YandexMapsRequester, stop_id, routes, name): + def __init__(self, requester: YandexMapsRequester, stop_id, routes, name) -> None: """Initialize sensor.""" self.requester = requester self._stop_id = stop_id diff --git a/homeassistant/components/zha/alarm_control_panel.py b/homeassistant/components/zha/alarm_control_panel.py index ee37a345e17..6a5e8bb476a 100644 --- a/homeassistant/components/zha/alarm_control_panel.py +++ b/homeassistant/components/zha/alarm_control_panel.py @@ -89,7 +89,7 @@ class ZHAAlarmControlPanel(ZhaEntity, AlarmControlPanelEntity): | AlarmControlPanelEntityFeature.TRIGGER ) - def __init__(self, unique_id, zha_device: ZHADevice, channels, **kwargs): + def __init__(self, unique_id, zha_device: ZHADevice, channels, **kwargs) -> None: """Initialize the ZHA alarm control device.""" super().__init__(unique_id, zha_device, channels, **kwargs) cfg_entry = zha_device.gateway.config_entry diff --git a/homeassistant/components/zha/light.py b/homeassistant/components/zha/light.py index f6acbe181d8..1e6bf203d01 100644 --- a/homeassistant/components/zha/light.py +++ b/homeassistant/components/zha/light.py @@ -623,7 +623,7 @@ class Light(BaseLight, ZhaEntity): _attr_supported_color_modes: set[ColorMode] _REFRESH_INTERVAL = (45, 75) - def __init__(self, unique_id, zha_device: ZHADevice, channels, **kwargs): + def __init__(self, unique_id, zha_device: ZHADevice, channels, **kwargs) -> None: """Initialize the ZHA light.""" super().__init__(unique_id, zha_device, channels, **kwargs) self._on_off_channel = self.cluster_channels[CHANNEL_ON_OFF]