mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Cleanup/typing fixes
This commit is contained in:
@@ -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."""
|
||||||
|
@@ -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."""
|
||||||
|
@@ -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)
|
||||||
|
@@ -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."""
|
||||||
|
@@ -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:
|
||||||
|
@@ -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."""
|
||||||
|
@@ -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."""
|
||||||
|
Reference in New Issue
Block a user