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

pull/56974/head
Marc Mueller 2021-10-03 02:59:38 +02:00 committed by GitHub
parent 0e1630e46d
commit 6a1d7c7ad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 18 deletions

View File

@ -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."""