mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 23:41:48 -05:00
Add Rabbit Air fan preset icons (#172931)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user