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