From 4b5d0915a9e1bd72434ef4013eaa9eb4d6f3f17e Mon Sep 17 00:00:00 2001 From: Jin Date: Fri, 28 Aug 2020 23:24:14 +0800 Subject: [PATCH] Add support for hmi208(xiaomi plug BLE) (#39306) As this plug has already been supported in [python-miio v5.1](https://github.com/rytilahti/python-miio/releases/tag/0.5.1). Changes towards xiaomi-miio made for fully supporting this device in HA. --- homeassistant/components/xiaomi_miio/switch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/xiaomi_miio/switch.py b/homeassistant/components/xiaomi_miio/switch.py index 26ffb7e578f..6dfcc539a44 100644 --- a/homeassistant/components/xiaomi_miio/switch.py +++ b/homeassistant/components/xiaomi_miio/switch.py @@ -57,6 +57,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( "chuangmi.plug.v3", "chuangmi.plug.hmi205", "chuangmi.plug.hmi206", + "chuangmi.plug.hmi208", "lumi.acpartner.v3", ] ), @@ -142,7 +143,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= except DeviceException as ex: raise PlatformNotReady from ex - if model in ["chuangmi.plug.v1", "chuangmi.plug.v3"]: + if model in ["chuangmi.plug.v1", "chuangmi.plug.v3", "chuangmi.plug.hmi208"]: plug = ChuangmiPlug(host, token, model=model) # The device has two switchable channels (mains and a USB port).