Remove icon if device_class is defined - homekit_controller (#56946)

This commit is contained in:
Marc Mueller
2021-10-03 02:59:38 +02:00
committed by GitHub
parent 0e1630e46d
commit 6a1d7c7ad9

View File

@@ -29,9 +29,6 @@ from homeassistant.core import callback
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"
@@ -148,11 +145,6 @@ class HomeKitHumiditySensor(HomeKitEntity, SensorEntity):
"""Return the name of the device."""
return f"{super().name} Humidity"
@property
def icon(self):
"""Return the sensor icon."""
return HUMIDITY_ICON
@property
def native_value(self):
"""Return the current humidity."""
@@ -174,11 +166,6 @@ class HomeKitTemperatureSensor(HomeKitEntity, SensorEntity):
"""Return the name of the device."""
return f"{super().name} Temperature"
@property
def icon(self):
"""Return the sensor icon."""
return TEMP_C_ICON
@property
def native_value(self):
"""Return the current temperature in Celsius."""
@@ -200,11 +187,6 @@ class HomeKitLightSensor(HomeKitEntity, SensorEntity):
"""Return the name of the device."""
return f"{super().name} Light Level"
@property
def icon(self):
"""Return the sensor icon."""
return BRIGHTNESS_ICON
@property
def native_value(self):
"""Return the current light level in lux."""