From 781b7687a4b12820590c5b2d3e7fcf590eba03af Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Fri, 23 Feb 2018 19:11:54 +0100 Subject: [PATCH] The name of the enum must be used here because of the speed_list. (#12625) The fan.set_speed example value is lower-case and led to confusion. Both spellings are possible now: Idle & idle --- homeassistant/components/fan/xiaomi_miio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/fan/xiaomi_miio.py b/homeassistant/components/fan/xiaomi_miio.py index 264962b9d56..b9bc54b5c79 100644 --- a/homeassistant/components/fan/xiaomi_miio.py +++ b/homeassistant/components/fan/xiaomi_miio.py @@ -302,7 +302,7 @@ class XiaomiAirPurifier(FanEntity): yield from self._try_command( "Setting operation mode of the air purifier failed.", - self._air_purifier.set_mode, OperationMode(speed)) + self._air_purifier.set_mode, OperationMode[speed.title()]) @asyncio.coroutine def async_set_buzzer_on(self):