Skip to content

Commit

Permalink
support some more devices
Browse files Browse the repository at this point in the history
Add device AqaraSwitchOneChannel  (product QBKG11LM) and AqaraSwitchTwoChannels (product QBKG12LM). The new SensorHT (product WSDCGQ11LM) can get pressure.  the Plug can get load_power.
Have tested on my devices.
  • Loading branch information
shengjianda authored May 3, 2020
1 parent 7a27314 commit a735f90
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions miio/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class DeviceType(IntEnum):
AqaraSwitch = 51
AqaraMotion = 52
AqaraMagnet = 53
AqaraSwitchOneChannel = 63
AqaraSwitchTwoChannels = 64


class Gateway(Device):
Expand Down Expand Up @@ -525,9 +527,17 @@ def __repr__(self):

class SensorHT(SubDevice):
accessor = "get_prop_sensor_ht"
properties = ["temperature", "humidity"]
properties = ["temperature", "humidity", "pressure"]


class Plug(SubDevice):
accessor = "get_prop_plug"
properties = ["power", "neutral_0"]
properties = ["power", "neutral_0", "load_power"]


class AqaraSwitchOneChannel(SubDevice):
properties = ["load_power", "neutral_0", "neutral_1"]


class AqaraSwitchTwoChannels(SubDevice):
properties = ["load_power", "neutral_0", "neutral_1"]

0 comments on commit a735f90

Please sign in to comment.