mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Add icon translations to Flux LED (#111545)
This commit is contained in:
parent
cc2ce4f4a6
commit
3d987a9190
@ -28,7 +28,6 @@ RESTART_BUTTON_DESCRIPTION = ButtonEntityDescription(
|
||||
UNPAIR_REMOTES_DESCRIPTION = ButtonEntityDescription(
|
||||
key=_UNPAIR_REMOTES_KEY,
|
||||
translation_key="unpair_remotes",
|
||||
icon="mdi:remote-off",
|
||||
)
|
||||
|
||||
|
||||
|
61
homeassistant/components/flux_led/icons.json
Normal file
61
homeassistant/components/flux_led/icons.json
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"entity": {
|
||||
"button": {
|
||||
"unpair_remotes": {
|
||||
"default": "mdi:remote-off"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"effect_speed": {
|
||||
"default": "mdi:speedometer"
|
||||
},
|
||||
"pixels_per_segment": {
|
||||
"default": "mdi:dots-grid"
|
||||
},
|
||||
"segments": {
|
||||
"default": "mdi:segment"
|
||||
},
|
||||
"music_pixels_per_segment": {
|
||||
"default": "mdi:dots-grid"
|
||||
},
|
||||
"music_segments": {
|
||||
"default": "mdi:segment"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
"power_restored": {
|
||||
"default": "mdi:transmission-tower-off"
|
||||
},
|
||||
"ic_type": {
|
||||
"default": "mdi:chip"
|
||||
},
|
||||
"wiring": {
|
||||
"default": "mdi:led-strip-variant"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"paired_remotes": {
|
||||
"default": "mdi:remote"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"remote_access": {
|
||||
"default": "mdi:cloud-off-outline",
|
||||
"state": {
|
||||
"on": "mdi:cloud-outline"
|
||||
}
|
||||
},
|
||||
"music": {
|
||||
"default": "mdi:microphone-off",
|
||||
"state": {
|
||||
"on": "mdi:microphone"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"set_custom_effect": "mdi:creation",
|
||||
"set_zones": "mdi:texture-box",
|
||||
"set_music_mode": "mdi:music"
|
||||
}
|
||||
}
|
@ -89,7 +89,6 @@ class FluxSpeedNumber(
|
||||
_attr_native_max_value = 100
|
||||
_attr_native_step = 1
|
||||
_attr_mode = NumberMode.SLIDER
|
||||
_attr_icon = "mdi:speedometer"
|
||||
_attr_translation_key = "effect_speed"
|
||||
|
||||
@property
|
||||
@ -175,7 +174,6 @@ class FluxPixelsPerSegmentNumber(FluxConfigNumber):
|
||||
"""Defines a flux_led pixels per segment number."""
|
||||
|
||||
_attr_translation_key = "pixels_per_segment"
|
||||
_attr_icon = "mdi:dots-grid"
|
||||
|
||||
@property
|
||||
def native_max_value(self) -> int:
|
||||
@ -202,7 +200,6 @@ class FluxSegmentsNumber(FluxConfigNumber):
|
||||
"""Defines a flux_led segments number."""
|
||||
|
||||
_attr_translation_key = "segments"
|
||||
_attr_icon = "mdi:segment"
|
||||
|
||||
@property
|
||||
def native_max_value(self) -> int:
|
||||
@ -237,7 +234,6 @@ class FluxMusicPixelsPerSegmentNumber(FluxMusicNumber):
|
||||
"""Defines a flux_led music pixels per segment number."""
|
||||
|
||||
_attr_translation_key = "music_pixels_per_segment"
|
||||
_attr_icon = "mdi:dots-grid"
|
||||
|
||||
@property
|
||||
def native_max_value(self) -> int:
|
||||
@ -266,7 +262,6 @@ class FluxMusicSegmentsNumber(FluxMusicNumber):
|
||||
"""Defines a flux_led music segments number."""
|
||||
|
||||
_attr_translation_key = "music_segments"
|
||||
_attr_icon = "mdi:segment"
|
||||
|
||||
@property
|
||||
def native_max_value(self) -> int:
|
||||
|
@ -91,7 +91,6 @@ class FluxPowerStateSelect(FluxConfigAtStartSelect, SelectEntity):
|
||||
"""Representation of a Flux power restore state option."""
|
||||
|
||||
_attr_translation_key = "power_restored"
|
||||
_attr_icon = "mdi:transmission-tower-off"
|
||||
_attr_options = list(NAME_TO_POWER_RESTORE_STATE)
|
||||
|
||||
def __init__(
|
||||
@ -125,7 +124,6 @@ class FluxPowerStateSelect(FluxConfigAtStartSelect, SelectEntity):
|
||||
class FluxICTypeSelect(FluxConfigSelect):
|
||||
"""Representation of Flux ic type."""
|
||||
|
||||
_attr_icon = "mdi:chip"
|
||||
_attr_translation_key = "ic_type"
|
||||
|
||||
@property
|
||||
@ -148,7 +146,6 @@ class FluxICTypeSelect(FluxConfigSelect):
|
||||
class FluxWiringsSelect(FluxConfigSelect):
|
||||
"""Representation of Flux wirings."""
|
||||
|
||||
_attr_icon = "mdi:led-strip-variant"
|
||||
_attr_translation_key = "wiring"
|
||||
|
||||
@property
|
||||
|
@ -34,7 +34,6 @@ async def async_setup_entry(
|
||||
class FluxPairedRemotes(FluxEntity, SensorEntity):
|
||||
"""Representation of a Magic Home paired remotes sensor."""
|
||||
|
||||
_attr_icon = "mdi:remote"
|
||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||
_attr_translation_key = "paired_remotes"
|
||||
|
||||
|
@ -103,11 +103,6 @@ class FluxRemoteAccessSwitch(FluxBaseEntity, SwitchEntity):
|
||||
"""Return true if remote access is enabled."""
|
||||
return bool(self.entry.data[CONF_REMOTE_ACCESS_ENABLED])
|
||||
|
||||
@property
|
||||
def icon(self) -> str:
|
||||
"""Return icon based on state."""
|
||||
return "mdi:cloud-outline" if self.is_on else "mdi:cloud-off-outline"
|
||||
|
||||
|
||||
class FluxMusicSwitch(FluxEntity, SwitchEntity):
|
||||
"""Representation of a Flux music switch."""
|
||||
@ -131,8 +126,3 @@ class FluxMusicSwitch(FluxEntity, SwitchEntity):
|
||||
def is_on(self) -> bool:
|
||||
"""Return true if microphone is is on."""
|
||||
return self._device.is_on and self._device.effect == MODE_MUSIC
|
||||
|
||||
@property
|
||||
def icon(self) -> str:
|
||||
"""Return icon based on state."""
|
||||
return "mdi:microphone" if self.is_on else "mdi:microphone-off"
|
||||
|
Loading…
x
Reference in New Issue
Block a user