Add fan preset mode icons and strings to vesync (#129584)

This commit is contained in:
Daniel Oltmanns 2024-11-09 16:48:00 +01:00 committed by GitHub
parent 928e5348e4
commit b61580a937
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 35 additions and 4 deletions

View File

@ -94,6 +94,7 @@ class VeSyncFanHA(VeSyncDevice, FanEntity):
| FanEntityFeature.TURN_ON
)
_attr_name = None
_attr_translation_key = "vesync"
_enable_turn_on_off_backwards_compatibility = False
def __init__(self, fan) -> None:

View File

@ -1,4 +1,20 @@
{
"entity": {
"fan": {
"vesync": {
"state_attributes": {
"preset_mode": {
"state": {
"auto": "mdi:fan-auto",
"sleep": "mdi:sleep",
"pet": "mdi:paw",
"turbo": "mdi:weather-tornado"
}
}
}
}
}
},
"services": {
"update_devices": {
"service": "mdi:update"

View File

@ -42,6 +42,20 @@
"current_voltage": {
"name": "Current voltage"
}
},
"fan": {
"vesync": {
"state_attributes": {
"preset_mode": {
"state": {
"auto": "Auto",
"sleep": "Sleep",
"pet": "Pet",
"turbo": "Turbo"
}
}
}
}
}
},
"services": {

View File

@ -67,7 +67,7 @@
'platform': 'vesync',
'previous_unique_id': None,
'supported_features': <FanEntityFeature: 57>,
'translation_key': None,
'translation_key': 'vesync',
'unique_id': 'air-purifier',
'unit_of_measurement': None,
}),
@ -158,7 +158,7 @@
'platform': 'vesync',
'previous_unique_id': None,
'supported_features': <FanEntityFeature: 57>,
'translation_key': None,
'translation_key': 'vesync',
'unique_id': 'asd_sdfKIHG7IJHGwJGJ7GJ_ag5h3G55',
'unit_of_measurement': None,
}),
@ -256,7 +256,7 @@
'platform': 'vesync',
'previous_unique_id': None,
'supported_features': <FanEntityFeature: 57>,
'translation_key': None,
'translation_key': 'vesync',
'unique_id': '400s-purifier',
'unit_of_measurement': None,
}),
@ -355,7 +355,7 @@
'platform': 'vesync',
'previous_unique_id': None,
'supported_features': <FanEntityFeature: 57>,
'translation_key': None,
'translation_key': 'vesync',
'unique_id': '600s-purifier',
'unit_of_measurement': None,
}),