Remove unsupported strong mode of the Xiaomi Air Humidifier CA1 (#18926)

* Remove unsupported strong mode of the Xiaomi Air Humidifier CA1

* Clean up filter of unsupported modes
This commit is contained in:
Sebastian Muszynski 2018-12-05 20:56:43 +01:00 committed by Teemu R
parent 08702548f3
commit af96694430

View File

@ -755,12 +755,13 @@ class XiaomiAirHumidifier(XiaomiGenericDevice):
if self._model == MODEL_AIRHUMIDIFIER_CA:
self._device_features = FEATURE_FLAGS_AIRHUMIDIFIER_CA
self._available_attributes = AVAILABLE_ATTRIBUTES_AIRHUMIDIFIER_CA
self._speed_list = [mode.name for mode in OperationMode]
self._speed_list = [mode.name for mode in OperationMode if
mode is not OperationMode.Strong]
else:
self._device_features = FEATURE_FLAGS_AIRHUMIDIFIER
self._available_attributes = AVAILABLE_ATTRIBUTES_AIRHUMIDIFIER
self._speed_list = [mode.name for mode in OperationMode if
mode.name != 'Auto']
mode is not OperationMode.Auto]
self._state_attrs.update(
{attribute: None for attribute in self._available_attributes})