Skip to content

Commit

Permalink
Add some new model names of Xiaomi Aqara devices (#17234)
Browse files Browse the repository at this point in the history
* Add additional model name of the Xiaomi Aqara Button (WXKG11LM)

* Add additional model name of the Xiaomi Aqara Wireless Switch (WXKG02LM, WXKG03LM)

* Bump PyXiaomiGateway version
  • Loading branch information
syssi authored and balloob committed Oct 8, 2018
1 parent 4b7f855 commit 315f83e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions homeassistant/components/binary_sensor/xiaomi_aqara.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,24 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
elif model in ['natgas', 'sensor_natgas']:
devices.append(XiaomiNatgasSensor(device, gateway))
elif model in ['switch', 'sensor_switch',
'sensor_switch.aq2', 'sensor_switch.aq3']:
'sensor_switch.aq2', 'sensor_switch.aq3',
'remote.b1acn01']:
if 'proto' not in device or int(device['proto'][0:1]) == 1:
data_key = 'status'
else:
data_key = 'button_0'
devices.append(XiaomiButton(device, 'Switch', data_key,
hass, gateway))
elif model in ['86sw1', 'sensor_86sw1', 'sensor_86sw1.aq1']:
elif model in ['86sw1', 'sensor_86sw1', 'sensor_86sw1.aq1',
'remote.b186acn01']:
if 'proto' not in device or int(device['proto'][0:1]) == 1:
data_key = 'channel_0'
else:
data_key = 'button_0'
devices.append(XiaomiButton(device, 'Wall Switch', data_key,
hass, gateway))
elif model in ['86sw2', 'sensor_86sw2', 'sensor_86sw2.aq1']:
elif model in ['86sw2', 'sensor_86sw2', 'sensor_86sw2.aq1',
'remote.b286acn01']:
if 'proto' not in device or int(device['proto'][0:1]) == 1:
data_key_left = 'channel_0'
data_key_right = 'channel_1'
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/xiaomi_aqara.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from homeassistant.util.dt import utcnow
from homeassistant.util import slugify

REQUIREMENTS = ['PyXiaomiGateway==0.11.0']
REQUIREMENTS = ['PyXiaomiGateway==0.11.1']

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PyRMVtransport==0.1
PySwitchbot==0.3

# homeassistant.components.xiaomi_aqara
PyXiaomiGateway==0.11.0
PyXiaomiGateway==0.11.1

# homeassistant.components.rpi_gpio
# RPi.GPIO==0.6.1
Expand Down

0 comments on commit 315f83e

Please sign in to comment.