Cleanup/typing fixes

This commit is contained in:
Franck Nijhof
2021-05-21 13:15:25 +02:00
parent 2b8c3a818f
commit 659b79e75a
7 changed files with 0 additions and 35 deletions

View File

@@ -72,11 +72,6 @@ class AirlyAirQuality(CoordinatorEntity, AirQualityEntity):
"""Return the name.""" """Return the name."""
return self._name return self._name
@property
def icon(self) -> str:
"""Return the icon."""
return self._icon
@property @property
def air_quality_index(self) -> float | None: def air_quality_index(self) -> float | None:
"""Return the air quality index.""" """Return the air quality index."""

View File

@@ -117,11 +117,6 @@ class BH1750Sensor(SensorEntity):
"""Return the state of the sensor.""" """Return the state of the sensor."""
return self._state return self._state
@property
def unit_of_measurement(self) -> str:
"""Return the unit of measurement of the sensor."""
return self._unit_of_measurement
@property @property
def device_class(self) -> str: def device_class(self) -> str:
"""Return the class of this device, from component DEVICE_CLASSES.""" """Return the class of this device, from component DEVICE_CLASSES."""

View File

@@ -90,11 +90,6 @@ class HTU21DSensor(SensorEntity):
"""Return the state of the sensor.""" """Return the state of the sensor."""
return self._state 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): async def async_update(self):
"""Get the latest data from the HTU21D sensor and update the state.""" """Get the latest data from the HTU21D sensor and update the state."""
await self.hass.async_add_executor_job(self._client.update) await self.hass.async_add_executor_job(self._client.update)

View File

@@ -189,11 +189,6 @@ class KNXClimate(KnxEntity, ClimateEntity):
if self._device.mode is not None: if self._device.mode is not None:
await self._device.mode.sync() await self._device.mode.sync()
@property
def temperature_unit(self) -> str:
"""Return the unit of measurement."""
return self._unit_of_measurement
@property @property
def current_temperature(self) -> float | None: def current_temperature(self) -> float | None:
"""Return the current temperature.""" """Return the current temperature."""

View File

@@ -86,11 +86,6 @@ class VL53L1XSensor(SensorEntity):
"""Return the state of the sensor.""" """Return the state of the sensor."""
return self._state return self._state
@property
def unit_of_measurement(self) -> str:
"""Return the unit of measurement."""
return self._unit_of_measurement
def update(self): def update(self):
"""Get the latest measurement and update state.""" """Get the latest measurement and update state."""
if self.init: if self.init:

View File

@@ -97,11 +97,6 @@ class TwenteMilieuSensor(SensorEntity):
"""Return the name of the entity.""" """Return the name of the entity."""
return self._name return self._name
@property
def icon(self) -> str:
"""Return the mdi icon of the entity."""
return self._icon
@property @property
def available(self) -> bool: def available(self) -> bool:
"""Return True if entity is available.""" """Return True if entity is available."""

View File

@@ -153,11 +153,6 @@ class WLEDEntity(CoordinatorEntity):
"""Return the name of the entity.""" """Return the name of the entity."""
return self._name return self._name
@property
def icon(self) -> str:
"""Return the mdi icon of the entity."""
return self._icon
@property @property
def entity_registry_enabled_default(self) -> bool: def entity_registry_enabled_default(self) -> bool:
"""Return if the entity should be enabled when first added to the entity registry.""" """Return if the entity should be enabled when first added to the entity registry."""