diff --git a/homeassistant/components/binary_sensor/xiaomi_aqara.py b/homeassistant/components/binary_sensor/xiaomi_aqara.py index 99037f60107..2ed0de66b18 100644 --- a/homeassistant/components/binary_sensor/xiaomi_aqara.py +++ b/homeassistant/components/binary_sensor/xiaomi_aqara.py @@ -319,7 +319,10 @@ class XiaomiButton(XiaomiBinarySensor): click_type = 'double' elif value == 'both_click': click_type = 'both' + elif value == 'shake': + click_type = 'shake' else: + _LOGGER.warning("Unsupported click_type detected: %s", value) return False self._hass.bus.fire('click', { diff --git a/homeassistant/components/switch/xiaomi_aqara.py b/homeassistant/components/switch/xiaomi_aqara.py index 1688b6b89e1..939fc70660a 100644 --- a/homeassistant/components/switch/xiaomi_aqara.py +++ b/homeassistant/components/switch/xiaomi_aqara.py @@ -28,22 +28,22 @@ def setup_platform(hass, config, add_devices, discovery_info=None): if model == 'plug': devices.append(XiaomiGenericSwitch(device, "Plug", 'status', True, gateway)) - elif model == 'ctrl_neutral1': + elif model in ['ctrl_neutral1', 'ctrl_neutral1.aq1']: devices.append(XiaomiGenericSwitch(device, 'Wall Switch', 'channel_0', False, gateway)) - elif model == 'ctrl_ln1': + elif model in ['ctrl_ln1', 'ctrl_ln1.aq1']: devices.append(XiaomiGenericSwitch(device, 'Wall Switch LN', 'channel_0', False, gateway)) - elif model == 'ctrl_neutral2': + elif model in ['ctrl_neutral2', 'ctrl_neutral2.aq1']: devices.append(XiaomiGenericSwitch(device, 'Wall Switch Left', 'channel_0', False, gateway)) devices.append(XiaomiGenericSwitch(device, 'Wall Switch Right', 'channel_1', False, gateway)) - elif model == 'ctrl_ln2': + elif model in ['ctrl_ln2', 'ctrl_ln2.aq1']: devices.append(XiaomiGenericSwitch(device, 'Wall Switch LN Left', 'channel_0', @@ -52,7 +52,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): 'Wall Switch LN Right', 'channel_1', False, gateway)) - elif model == '86plug': + elif model in ['86plug', 'ctrl_86plug.aq1']: devices.append(XiaomiGenericSwitch(device, 'Wall Plug', 'status', True, gateway)) add_devices(devices) diff --git a/homeassistant/components/xiaomi_aqara.py b/homeassistant/components/xiaomi_aqara.py index e5942f97139..385ce0e0ac9 100644 --- a/homeassistant/components/xiaomi_aqara.py +++ b/homeassistant/components/xiaomi_aqara.py @@ -23,7 +23,7 @@ from homeassistant.helpers.event import async_track_point_in_utc_time from homeassistant.util.dt import utcnow from homeassistant.util import slugify -REQUIREMENTS = ['PyXiaomiGateway==0.8.1'] +REQUIREMENTS = ['PyXiaomiGateway==0.8.2'] _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 93710e6506e..0de78b07f7b 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -39,7 +39,7 @@ PyMVGLive==1.1.4 PyMata==2.14 # homeassistant.components.xiaomi_aqara -PyXiaomiGateway==0.8.1 +PyXiaomiGateway==0.8.2 # homeassistant.components.rpi_gpio # RPi.GPIO==0.6.1