From af96694430a8b687093cd50b79ab7e0088a1f104 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Wed, 5 Dec 2018 20:56:43 +0100 Subject: [PATCH] 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 --- homeassistant/components/fan/xiaomi_miio.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/fan/xiaomi_miio.py b/homeassistant/components/fan/xiaomi_miio.py index ca35f75b097..e6349782cd1 100644 --- a/homeassistant/components/fan/xiaomi_miio.py +++ b/homeassistant/components/fan/xiaomi_miio.py @@ -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})