mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add some new model names of Xiaomi Aqara devices (#17234)
* 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
This commit is contained in:
parent
4b7f85518f
commit
315f83e1ea
@ -36,21 +36,24 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||||||
elif model in ['natgas', 'sensor_natgas']:
|
elif model in ['natgas', 'sensor_natgas']:
|
||||||
devices.append(XiaomiNatgasSensor(device, gateway))
|
devices.append(XiaomiNatgasSensor(device, gateway))
|
||||||
elif model in ['switch', 'sensor_switch',
|
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:
|
if 'proto' not in device or int(device['proto'][0:1]) == 1:
|
||||||
data_key = 'status'
|
data_key = 'status'
|
||||||
else:
|
else:
|
||||||
data_key = 'button_0'
|
data_key = 'button_0'
|
||||||
devices.append(XiaomiButton(device, 'Switch', data_key,
|
devices.append(XiaomiButton(device, 'Switch', data_key,
|
||||||
hass, gateway))
|
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:
|
if 'proto' not in device or int(device['proto'][0:1]) == 1:
|
||||||
data_key = 'channel_0'
|
data_key = 'channel_0'
|
||||||
else:
|
else:
|
||||||
data_key = 'button_0'
|
data_key = 'button_0'
|
||||||
devices.append(XiaomiButton(device, 'Wall Switch', data_key,
|
devices.append(XiaomiButton(device, 'Wall Switch', data_key,
|
||||||
hass, gateway))
|
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:
|
if 'proto' not in device or int(device['proto'][0:1]) == 1:
|
||||||
data_key_left = 'channel_0'
|
data_key_left = 'channel_0'
|
||||||
data_key_right = 'channel_1'
|
data_key_right = 'channel_1'
|
||||||
|
@ -22,7 +22,7 @@ from homeassistant.helpers.event import async_track_point_in_utc_time
|
|||||||
from homeassistant.util.dt import utcnow
|
from homeassistant.util.dt import utcnow
|
||||||
from homeassistant.util import slugify
|
from homeassistant.util import slugify
|
||||||
|
|
||||||
REQUIREMENTS = ['PyXiaomiGateway==0.11.0']
|
REQUIREMENTS = ['PyXiaomiGateway==0.11.1']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ PyRMVtransport==0.1
|
|||||||
PySwitchbot==0.3
|
PySwitchbot==0.3
|
||||||
|
|
||||||
# homeassistant.components.xiaomi_aqara
|
# homeassistant.components.xiaomi_aqara
|
||||||
PyXiaomiGateway==0.11.0
|
PyXiaomiGateway==0.11.1
|
||||||
|
|
||||||
# homeassistant.components.rpi_gpio
|
# homeassistant.components.rpi_gpio
|
||||||
# RPi.GPIO==0.6.1
|
# RPi.GPIO==0.6.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user