Enable the `PRESET_MODE` `FanEntityFeature` for VeSync air purifiers (#97657)
parent
4c395c0124
commit
6f8d666b57
|
@ -86,10 +86,10 @@ def _setup_entities(devices, async_add_entities):
|
|||
class VeSyncFanHA(VeSyncDevice, FanEntity):
|
||||
"""Representation of a VeSync fan."""
|
||||
|
||||
_attr_supported_features = FanEntityFeature.SET_SPEED
|
||||
_attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE
|
||||
_attr_name = None
|
||||
|
||||
def __init__(self, fan):
|
||||
def __init__(self, fan) -> None:
|
||||
"""Initialize the VeSync fan device."""
|
||||
super().__init__(fan)
|
||||
self.smartfan = fan
|
||||
|
|
|
@ -200,7 +200,7 @@
|
|||
'auto',
|
||||
'sleep',
|
||||
]),
|
||||
'supported_features': 1,
|
||||
'supported_features': 9,
|
||||
}),
|
||||
'entity_id': 'fan.fan',
|
||||
'last_changed': str,
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
'original_icon': None,
|
||||
'original_name': None,
|
||||
'platform': 'vesync',
|
||||
'supported_features': <FanEntityFeature: 1>,
|
||||
'supported_features': <FanEntityFeature: 9>,
|
||||
'translation_key': None,
|
||||
'unique_id': 'air-purifier',
|
||||
'unit_of_measurement': None,
|
||||
|
@ -73,7 +73,7 @@
|
|||
'auto',
|
||||
'sleep',
|
||||
]),
|
||||
'supported_features': <FanEntityFeature: 1>,
|
||||
'supported_features': <FanEntityFeature: 9>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'fan.air_purifier_131s',
|
||||
|
@ -140,7 +140,7 @@
|
|||
'original_icon': None,
|
||||
'original_name': None,
|
||||
'platform': 'vesync',
|
||||
'supported_features': <FanEntityFeature: 1>,
|
||||
'supported_features': <FanEntityFeature: 9>,
|
||||
'translation_key': None,
|
||||
'unique_id': 'asd_sdfKIHG7IJHGwJGJ7GJ_ag5h3G55',
|
||||
'unit_of_measurement': None,
|
||||
|
@ -161,7 +161,7 @@
|
|||
'sleep',
|
||||
]),
|
||||
'screen_status': True,
|
||||
'supported_features': <FanEntityFeature: 1>,
|
||||
'supported_features': <FanEntityFeature: 9>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'fan.air_purifier_200s',
|
||||
|
@ -229,7 +229,7 @@
|
|||
'original_icon': None,
|
||||
'original_name': None,
|
||||
'platform': 'vesync',
|
||||
'supported_features': <FanEntityFeature: 1>,
|
||||
'supported_features': <FanEntityFeature: 9>,
|
||||
'translation_key': None,
|
||||
'unique_id': '400s-purifier',
|
||||
'unit_of_measurement': None,
|
||||
|
@ -251,7 +251,7 @@
|
|||
'sleep',
|
||||
]),
|
||||
'screen_status': True,
|
||||
'supported_features': <FanEntityFeature: 1>,
|
||||
'supported_features': <FanEntityFeature: 9>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'fan.air_purifier_400s',
|
||||
|
@ -319,7 +319,7 @@
|
|||
'original_icon': None,
|
||||
'original_name': None,
|
||||
'platform': 'vesync',
|
||||
'supported_features': <FanEntityFeature: 1>,
|
||||
'supported_features': <FanEntityFeature: 9>,
|
||||
'translation_key': None,
|
||||
'unique_id': '600s-purifier',
|
||||
'unit_of_measurement': None,
|
||||
|
@ -341,7 +341,7 @@
|
|||
'sleep',
|
||||
]),
|
||||
'screen_status': True,
|
||||
'supported_features': <FanEntityFeature: 1>,
|
||||
'supported_features': <FanEntityFeature: 9>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'fan.air_purifier_600s',
|
||||
|
|
Loading…
Reference in New Issue