Device support for different new sensors of the xiaomi aqara gateway (#8577)
* The gateway configuration accepts a MAC address or a SID value in uppercase already. The ringtone services accepts the same values now. I hope it will avoid confusion. * Device support for the new wall switches with neutral lead (ctrl_ln1, ctrl_ln2) added. * Measurement unit from pressure of weather.v1 fixed. * Device support for sensor_magnet.aq2 added. * Device support for sensor_motion.aq2 (motion and lux) added. * Code reformatted. * The ringtone service (start/stop) uses the parameter gw_mac instead of gw_sid now. * Version of the required library updated.
This commit is contained in:
1 parent
f6a5e0887d
commit
fada6d3f49
4 files changed
+33
-9
No files matched your search
@@ -27,6 +27,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
devices.append(XiaomiGenericSwitch(device, 'Wall Switch',
|
||||
'channel_0',
|
||||
False, gateway))
|
||||
elif model == 'ctrl_ln1':
|
||||
devices.append(XiaomiGenericSwitch(device, 'Wall Switch LN',
|
||||
'channel_0',
|
||||
False, gateway))
|
||||
elif model == 'ctrl_neutral2':
|
||||
devices.append(XiaomiGenericSwitch(device, 'Wall Switch Left',
|
||||
'channel_0',
|
||||
@@ -34,6 +38,15 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
devices.append(XiaomiGenericSwitch(device, 'Wall Switch Right',
|
||||
'channel_1',
|
||||
False, gateway))
|
||||
elif model == 'ctrl_ln2':
|
||||
devices.append(XiaomiGenericSwitch(device,
|
||||
'Wall Switch LN Left',
|
||||
'channel_0',
|
||||
False, gateway))
|
||||
devices.append(XiaomiGenericSwitch(device,
|
||||
'Wall Switch LN Right',
|
||||
'channel_1',
|
||||
False, gateway))
|
||||
elif model == '86plug':
|
||||
devices.append(XiaomiGenericSwitch(device, 'Wall Plug',
|
||||
'status', True, gateway))
|
||||
|
||||
Reference in new issue
Block a user