Disable speeds for first gen Xiaomi_miio air purifiers (#52772)

* Disable speeds for first gen air purifiers

* Remove test code line

* remove OPERATION_MODES_AIRPURIFIER list
pull/53335/head
Jan Bouwhuis 2021-07-22 08:57:29 +02:00 committed by GitHub
parent 804499968e
commit 9753500f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -336,7 +336,6 @@ AVAILABLE_ATTRIBUTES_AIRFRESH = {
ATTR_EXTRA_FEATURES: "extra_features",
}
OPERATION_MODES_AIRPURIFIER = ["Auto", "Silent", "Favorite", "Idle"]
PRESET_MODES_AIRPURIFIER = ["Auto", "Silent", "Favorite", "Idle"]
OPERATION_MODES_AIRPURIFIER_PRO = ["Auto", "Silent", "Favorite"]
PRESET_MODES_AIRPURIFIER_PRO = ["Auto", "Silent", "Favorite"]
@ -903,10 +902,10 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
self._device_features = FEATURE_FLAGS_AIRPURIFIER
self._available_attributes = AVAILABLE_ATTRIBUTES_AIRPURIFIER
self._preset_modes = PRESET_MODES_AIRPURIFIER
self._supported_features = SUPPORT_SET_SPEED | SUPPORT_PRESET_MODE
self._speed_count = 4
self._supported_features = SUPPORT_PRESET_MODE
self._speed_count = 1
# the speed_list attribute is deprecated, support will end with release 2021.7
self._speed_list = OPERATION_MODES_AIRPURIFIER
self._speed_list = []
self._state_attrs.update(
{attribute: None for attribute in self._available_attributes}