mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Add translations for xiaomi miio fan preset modes (#122367)
This commit is contained in:
parent
8d538fcd52
commit
33f0840a26
@ -98,8 +98,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
DATA_KEY = "fan.xiaomi_miio"
|
DATA_KEY = "fan.xiaomi_miio"
|
||||||
|
|
||||||
ATTR_MODE_NATURE = "Nature"
|
ATTR_MODE_NATURE = "nature"
|
||||||
ATTR_MODE_NORMAL = "Normal"
|
ATTR_MODE_NORMAL = "normal"
|
||||||
|
|
||||||
# Air Purifier
|
# Air Purifier
|
||||||
ATTR_BRIGHTNESS = "brightness"
|
ATTR_BRIGHTNESS = "brightness"
|
||||||
@ -845,6 +845,8 @@ class XiaomiAirFreshT2017(XiaomiAirFreshA1):
|
|||||||
class XiaomiGenericFan(XiaomiGenericDevice):
|
class XiaomiGenericFan(XiaomiGenericDevice):
|
||||||
"""Representation of a generic Xiaomi Fan."""
|
"""Representation of a generic Xiaomi Fan."""
|
||||||
|
|
||||||
|
_attr_translation_key = "generic_fan"
|
||||||
|
|
||||||
def __init__(self, device, entry, unique_id, coordinator):
|
def __init__(self, device, entry, unique_id, coordinator):
|
||||||
"""Initialize the fan."""
|
"""Initialize the fan."""
|
||||||
super().__init__(device, entry, unique_id, coordinator)
|
super().__init__(device, entry, unique_id, coordinator)
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
{
|
{
|
||||||
|
"entity": {
|
||||||
|
"fan": {
|
||||||
|
"generic_fan": {
|
||||||
|
"state_attributes": {
|
||||||
|
"preset_mode": {
|
||||||
|
"state": {
|
||||||
|
"nature": "mdi:leaf",
|
||||||
|
"normal": "mdi:weather-windy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"fan_reset_filter": "mdi:refresh",
|
"fan_reset_filter": "mdi:refresh",
|
||||||
"fan_set_extra_features": "mdi:cog",
|
"fan_set_extra_features": "mdi:cog",
|
||||||
|
@ -93,6 +93,18 @@
|
|||||||
"high": "High"
|
"high": "High"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"fan": {
|
||||||
|
"generic_fan": {
|
||||||
|
"state_attributes": {
|
||||||
|
"preset_mode": {
|
||||||
|
"state": {
|
||||||
|
"nature": "Nature",
|
||||||
|
"normal": "Normal"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"services": {
|
"services": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user