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.
pull/39377/head
Jin 2020-08-28 23:24:14 +08:00 committed by GitHub
parent d2195e2b37
commit 4b5d0915a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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).