Browse Source

Change icon conditions for humidifier

Icons and condition were copy and paste from climate, but incorrect for
humidifier.
Jason Rumney 5 năm trước cách đây
mục cha
commit
a451cbdaf5

+ 3 - 3
custom_components/tuya_local/generic/humidifier.py

@@ -91,10 +91,10 @@ class TuyaLocalHumidifier(HumidifierEntity):
     @property
     @property
     def icon(self):
     def icon(self):
         """Return the icon to use in the frontend for this device."""
         """Return the icon to use in the frontend for this device."""
-        if self.hvac_mode == HVAC_MODE_HEAT:
-            return "mdi:radiator"
+        if self.is_on:
+            return "mdi:air-humidifier"
         else:
         else:
-            return "mdi:radiator-disabled"
+            return "mdi:air-humidifier-off"
 
 
     @property
     @property
     def is_on(self):
     def is_on(self):