From ea0e359d909baba4c7776884d9660f38e3264670 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Sat, 24 Oct 2020 04:07:45 +0200 Subject: [PATCH] Bump PyXiaomiGateway version to 0.13.4 (#42262) --- .../components/xiaomi_aqara/manifest.json | 2 +- .../components/xiaomi_aqara/switch.py | 28 ++++++++++++++++--- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/xiaomi_aqara/manifest.json b/homeassistant/components/xiaomi_aqara/manifest.json index 4b6cd76985d..eb115b6471d 100644 --- a/homeassistant/components/xiaomi_aqara/manifest.json +++ b/homeassistant/components/xiaomi_aqara/manifest.json @@ -3,7 +3,7 @@ "name": "Xiaomi Gateway (Aqara)", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/xiaomi_aqara", - "requirements": ["PyXiaomiGateway==0.13.3"], + "requirements": ["PyXiaomiGateway==0.13.4"], "after_dependencies": ["discovery"], "codeowners": ["@danielhiversen", "@syssi"], "zeroconf": ["_miio._udp.local."] diff --git a/homeassistant/components/xiaomi_aqara/switch.py b/homeassistant/components/xiaomi_aqara/switch.py index aee66e1a439..6e75ddb487e 100644 --- a/homeassistant/components/xiaomi_aqara/switch.py +++ b/homeassistant/components/xiaomi_aqara/switch.py @@ -37,19 +37,34 @@ async def async_setup_entry(hass, config_entry, async_add_entities): device, "Plug", data_key, True, gateway, config_entry ) ) - elif model in ["ctrl_neutral1", "ctrl_neutral1.aq1", "switch_b1lacn02"]: + elif model in [ + "ctrl_neutral1", + "ctrl_neutral1.aq1", + "switch_b1lacn02", + "switch.b1lacn02", + ]: entities.append( XiaomiGenericSwitch( device, "Wall Switch", "channel_0", False, gateway, config_entry ) ) - elif model in ["ctrl_ln1", "ctrl_ln1.aq1", "switch_b1nacn02"]: + elif model in [ + "ctrl_ln1", + "ctrl_ln1.aq1", + "switch_b1nacn02", + "switch.b1nacn02", + ]: entities.append( XiaomiGenericSwitch( device, "Wall Switch LN", "channel_0", False, gateway, config_entry ) ) - elif model in ["ctrl_neutral2", "ctrl_neutral2.aq1", "switch_b2lacn02"]: + elif model in [ + "ctrl_neutral2", + "ctrl_neutral2.aq1", + "switch_b2lacn02", + "switch.b2lacn02", + ]: entities.append( XiaomiGenericSwitch( device, @@ -70,7 +85,12 @@ async def async_setup_entry(hass, config_entry, async_add_entities): config_entry, ) ) - elif model in ["ctrl_ln2", "ctrl_ln2.aq1", "switch_b2nacn02"]: + elif model in [ + "ctrl_ln2", + "ctrl_ln2.aq1", + "switch_b2nacn02", + "switch.b2nacn02", + ]: entities.append( XiaomiGenericSwitch( device, diff --git a/requirements_all.txt b/requirements_all.txt index 652605e7e71..4052726f73f 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -70,7 +70,7 @@ PyTurboJPEG==1.4.0 PyViCare==0.2.0 # homeassistant.components.xiaomi_aqara -PyXiaomiGateway==0.13.3 +PyXiaomiGateway==0.13.4 # homeassistant.components.bmp280 # homeassistant.components.mcp23017 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index dccc1c0cdc5..00ddb47484b 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -30,7 +30,7 @@ PyTransportNSW==0.1.1 PyTurboJPEG==1.4.0 # homeassistant.components.xiaomi_aqara -PyXiaomiGateway==0.13.3 +PyXiaomiGateway==0.13.4 # homeassistant.components.remember_the_milk RtmAPI==0.7.2