mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Add icon translations to Wilight (#112357)
This commit is contained in:
parent
1cc58f217b
commit
66fae7ff9d
@ -55,7 +55,6 @@ class WiLightFan(WiLightDevice, FanEntity):
|
||||
"""Representation of a WiLights fan."""
|
||||
|
||||
_attr_name = None
|
||||
_attr_icon = "mdi:fan"
|
||||
_attr_speed_count = len(ORDERED_NAMED_FAN_SPEEDS)
|
||||
_attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.DIRECTION
|
||||
|
||||
|
17
homeassistant/components/wilight/icons.json
Normal file
17
homeassistant/components/wilight/icons.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"entity": {
|
||||
"switch": {
|
||||
"watering": {
|
||||
"default": "mdi:water"
|
||||
},
|
||||
"pause": {
|
||||
"default": "mdi:pause-circle-outline"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"set_watering_time": "mdi:timer",
|
||||
"set_pause_time": "mdi:timer-pause",
|
||||
"set_trigger": "mdi:gesture-tap-button"
|
||||
}
|
||||
}
|
@ -56,10 +56,6 @@ VALID_TRIGGER_INDEX = vol.All(
|
||||
DESC_WATERING = "watering"
|
||||
DESC_PAUSE = "pause"
|
||||
|
||||
# Icons of the valve switch entities
|
||||
ICON_WATERING = "mdi:water"
|
||||
ICON_PAUSE = "mdi:pause-circle-outline"
|
||||
|
||||
|
||||
def entities_from_discovered_wilight(api_device: PyWiLightDevice) -> tuple[Any]:
|
||||
"""Parse configuration and add WiLight switch entities."""
|
||||
@ -149,7 +145,6 @@ class WiLightValveSwitch(WiLightDevice, SwitchEntity):
|
||||
"""Representation of a WiLights Valve switch."""
|
||||
|
||||
_attr_translation_key = "watering"
|
||||
_attr_icon = ICON_WATERING
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
@ -266,7 +261,6 @@ class WiLightValvePauseSwitch(WiLightDevice, SwitchEntity):
|
||||
"""Representation of a WiLights Valve Pause switch."""
|
||||
|
||||
_attr_translation_key = "pause"
|
||||
_attr_icon = ICON_PAUSE
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
|
Loading…
x
Reference in New Issue
Block a user