Remove icon if device_class is defined - homekit_controller (#56946)
parent
0e1630e46d
commit
6a1d7c7ad9
|
@ -29,9 +29,6 @@ from homeassistant.core import callback
|
||||||
|
|
||||||
from . import KNOWN_DEVICES, CharacteristicEntity, HomeKitEntity
|
from . import KNOWN_DEVICES, CharacteristicEntity, HomeKitEntity
|
||||||
|
|
||||||
HUMIDITY_ICON = "mdi:water-percent"
|
|
||||||
TEMP_C_ICON = "mdi:thermometer"
|
|
||||||
BRIGHTNESS_ICON = "mdi:brightness-6"
|
|
||||||
CO2_ICON = "mdi:molecule-co2"
|
CO2_ICON = "mdi:molecule-co2"
|
||||||
|
|
||||||
|
|
||||||
|
@ -148,11 +145,6 @@ class HomeKitHumiditySensor(HomeKitEntity, SensorEntity):
|
||||||
"""Return the name of the device."""
|
"""Return the name of the device."""
|
||||||
return f"{super().name} Humidity"
|
return f"{super().name} Humidity"
|
||||||
|
|
||||||
@property
|
|
||||||
def icon(self):
|
|
||||||
"""Return the sensor icon."""
|
|
||||||
return HUMIDITY_ICON
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self):
|
def native_value(self):
|
||||||
"""Return the current humidity."""
|
"""Return the current humidity."""
|
||||||
|
@ -174,11 +166,6 @@ class HomeKitTemperatureSensor(HomeKitEntity, SensorEntity):
|
||||||
"""Return the name of the device."""
|
"""Return the name of the device."""
|
||||||
return f"{super().name} Temperature"
|
return f"{super().name} Temperature"
|
||||||
|
|
||||||
@property
|
|
||||||
def icon(self):
|
|
||||||
"""Return the sensor icon."""
|
|
||||||
return TEMP_C_ICON
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self):
|
def native_value(self):
|
||||||
"""Return the current temperature in Celsius."""
|
"""Return the current temperature in Celsius."""
|
||||||
|
@ -200,11 +187,6 @@ class HomeKitLightSensor(HomeKitEntity, SensorEntity):
|
||||||
"""Return the name of the device."""
|
"""Return the name of the device."""
|
||||||
return f"{super().name} Light Level"
|
return f"{super().name} Light Level"
|
||||||
|
|
||||||
@property
|
|
||||||
def icon(self):
|
|
||||||
"""Return the sensor icon."""
|
|
||||||
return BRIGHTNESS_ICON
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self):
|
def native_value(self):
|
||||||
"""Return the current light level in lux."""
|
"""Return the current light level in lux."""
|
||||||
|
|
Loading…
Reference in New Issue