Add Rabbit Air fan preset icons (#172931)

This commit is contained in:
Mark
2026-06-03 19:00:45 +02:00
committed by GitHub
parent 6f880ac8a9
commit 6291179292
3 changed files with 36 additions and 3 deletions
+4 -3
View File
@@ -23,9 +23,9 @@ SPEED_LIST = [
Speed.Turbo,
]
PRESET_MODE_AUTO = "Auto"
PRESET_MODE_MANUAL = "Manual"
PRESET_MODE_POLLEN = "Pollen"
PRESET_MODE_AUTO = "auto"
PRESET_MODE_MANUAL = "manual"
PRESET_MODE_POLLEN = "pollen"
PRESET_MODES = {
PRESET_MODE_AUTO: Mode.Auto,
@@ -46,6 +46,7 @@ async def async_setup_entry(
class RabbitAirFanEntity(RabbitAirBaseEntity, FanEntity):
"""Fan control functions of the Rabbit Air air purifier."""
_attr_translation_key = "rabbitair"
_attr_supported_features = (
FanEntityFeature.PRESET_MODE
| FanEntityFeature.SET_SPEED
@@ -0,0 +1,17 @@
{
"entity": {
"fan": {
"rabbitair": {
"state_attributes": {
"preset_mode": {
"state": {
"auto": "mdi:fan-auto",
"manual": "mdi:fan",
"pollen": "mdi:flower-pollen"
}
}
}
}
}
}
}
@@ -18,5 +18,20 @@
}
}
}
},
"entity": {
"fan": {
"rabbitair": {
"state_attributes": {
"preset_mode": {
"state": {
"auto": "[%key:common::state::auto%]",
"manual": "[%key:common::state::manual%]",
"pollen": "Pollen"
}
}
}
}
}
}
}