From 659b79e75a97007f7181064e446c3e988c2d54bb Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 21 May 2021 13:15:25 +0200 Subject: [PATCH] Cleanup/typing fixes --- homeassistant/components/airly/air_quality.py | 5 ----- homeassistant/components/bh1750/sensor.py | 5 ----- homeassistant/components/htu21d/sensor.py | 5 ----- homeassistant/components/knx/climate.py | 5 ----- homeassistant/components/tof/sensor.py | 5 ----- homeassistant/components/twentemilieu/sensor.py | 5 ----- homeassistant/components/wled/__init__.py | 5 ----- 7 files changed, 35 deletions(-) diff --git a/homeassistant/components/airly/air_quality.py b/homeassistant/components/airly/air_quality.py index 337d3a723fa..81c3d9487d3 100644 --- a/homeassistant/components/airly/air_quality.py +++ b/homeassistant/components/airly/air_quality.py @@ -72,11 +72,6 @@ class AirlyAirQuality(CoordinatorEntity, AirQualityEntity): """Return the name.""" return self._name - @property - def icon(self) -> str: - """Return the icon.""" - return self._icon - @property def air_quality_index(self) -> float | None: """Return the air quality index.""" diff --git a/homeassistant/components/bh1750/sensor.py b/homeassistant/components/bh1750/sensor.py index 5b708ae2630..9393da23496 100644 --- a/homeassistant/components/bh1750/sensor.py +++ b/homeassistant/components/bh1750/sensor.py @@ -117,11 +117,6 @@ class BH1750Sensor(SensorEntity): """Return the state of the sensor.""" return self._state - @property - def unit_of_measurement(self) -> str: - """Return the unit of measurement of the sensor.""" - return self._unit_of_measurement - @property def device_class(self) -> str: """Return the class of this device, from component DEVICE_CLASSES.""" diff --git a/homeassistant/components/htu21d/sensor.py b/homeassistant/components/htu21d/sensor.py index d32eebf6d5f..3b46531967f 100644 --- a/homeassistant/components/htu21d/sensor.py +++ b/homeassistant/components/htu21d/sensor.py @@ -90,11 +90,6 @@ class HTU21DSensor(SensorEntity): """Return the state of the sensor.""" return self._state - @property - def unit_of_measurement(self) -> str: - """Return the unit of measurement of the sensor.""" - return self._unit_of_measurement - async def async_update(self): """Get the latest data from the HTU21D sensor and update the state.""" await self.hass.async_add_executor_job(self._client.update) diff --git a/homeassistant/components/knx/climate.py b/homeassistant/components/knx/climate.py index b8c07767005..b553b4ee297 100644 --- a/homeassistant/components/knx/climate.py +++ b/homeassistant/components/knx/climate.py @@ -189,11 +189,6 @@ class KNXClimate(KnxEntity, ClimateEntity): if self._device.mode is not None: await self._device.mode.sync() - @property - def temperature_unit(self) -> str: - """Return the unit of measurement.""" - return self._unit_of_measurement - @property def current_temperature(self) -> float | None: """Return the current temperature.""" diff --git a/homeassistant/components/tof/sensor.py b/homeassistant/components/tof/sensor.py index 45713dd8f77..be3762cb03f 100644 --- a/homeassistant/components/tof/sensor.py +++ b/homeassistant/components/tof/sensor.py @@ -86,11 +86,6 @@ class VL53L1XSensor(SensorEntity): """Return the state of the sensor.""" return self._state - @property - def unit_of_measurement(self) -> str: - """Return the unit of measurement.""" - return self._unit_of_measurement - def update(self): """Get the latest measurement and update state.""" if self.init: diff --git a/homeassistant/components/twentemilieu/sensor.py b/homeassistant/components/twentemilieu/sensor.py index cc17bf6f1a2..9bfcca3a2d6 100644 --- a/homeassistant/components/twentemilieu/sensor.py +++ b/homeassistant/components/twentemilieu/sensor.py @@ -97,11 +97,6 @@ class TwenteMilieuSensor(SensorEntity): """Return the name of the entity.""" return self._name - @property - def icon(self) -> str: - """Return the mdi icon of the entity.""" - return self._icon - @property def available(self) -> bool: """Return True if entity is available.""" diff --git a/homeassistant/components/wled/__init__.py b/homeassistant/components/wled/__init__.py index 717bb87e057..2a663fac592 100644 --- a/homeassistant/components/wled/__init__.py +++ b/homeassistant/components/wled/__init__.py @@ -153,11 +153,6 @@ class WLEDEntity(CoordinatorEntity): """Return the name of the entity.""" return self._name - @property - def icon(self) -> str: - """Return the mdi icon of the entity.""" - return self._icon - @property def entity_registry_enabled_default(self) -> bool: """Return if the entity should be enabled when first added to the entity registry."""