Add translations for xiaomi miio fan preset modes (#122367)
This commit is contained in:
parent
8d538fcd52
commit
33f0840a26
3 changed files with 30 additions and 2 deletions
|
@ -98,8 +98,8 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
DATA_KEY = "fan.xiaomi_miio"
|
||||
|
||||
ATTR_MODE_NATURE = "Nature"
|
||||
ATTR_MODE_NORMAL = "Normal"
|
||||
ATTR_MODE_NATURE = "nature"
|
||||
ATTR_MODE_NORMAL = "normal"
|
||||
|
||||
# Air Purifier
|
||||
ATTR_BRIGHTNESS = "brightness"
|
||||
|
@ -845,6 +845,8 @@ class XiaomiAirFreshT2017(XiaomiAirFreshA1):
|
|||
class XiaomiGenericFan(XiaomiGenericDevice):
|
||||
"""Representation of a generic Xiaomi Fan."""
|
||||
|
||||
_attr_translation_key = "generic_fan"
|
||||
|
||||
def __init__(self, device, entry, unique_id, coordinator):
|
||||
"""Initialize the fan."""
|
||||
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": {
|
||||
"fan_reset_filter": "mdi:refresh",
|
||||
"fan_set_extra_features": "mdi:cog",
|
||||
|
|
|
@ -93,6 +93,18 @@
|
|||
"high": "High"
|
||||
}
|
||||
}
|
||||
},
|
||||
"fan": {
|
||||
"generic_fan": {
|
||||
"state_attributes": {
|
||||
"preset_mode": {
|
||||
"state": {
|
||||
"nature": "Nature",
|
||||
"normal": "Normal"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
|
|
Loading…
Add table
Reference in a new issue