Skip to content

Commit

Permalink
add more quirks
Browse files Browse the repository at this point in the history
  • Loading branch information
doudz committed Aug 16, 2020
1 parent 6fab776 commit 64d60df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions zigate/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3077,6 +3077,19 @@ def _handle_quirks(self, attribute):
data_map += [(0x01, 0x0406, 0x0000, values[100]),
(0x01, 0x0400, 0x0000, values[11])
]
elif self.get_type(False) == 'lumi.sensor_magnet.aq2':
data_map += [(0x01, 0x0006, 0x0000, values[100]),
]
elif self.get_type(False) == 'lumi.sensor_ht':
data_map += [(0x01, 0x0402, 0x0000, values[100]),
(0x01, 0x0405, 0x0000, values[101]),
]
elif self.get_type(False) == 'lumi.weather':
data_map += [(0x01, 0x0402, 0x0000, values[100]),
(0x01, 0x0405, 0x0000, values[101]),
(0x01, 0x0403, 0x0000, int(values[102] / 100)),
(0x01, 0x0403, 0x0010, values[102] / 10),
]
for endpoint_id, cluster_id, attribute_id, value in data_map:
self.set_attribute(endpoint_id, cluster_id, {'attribute': attribute_id, 'data': value})

Expand Down
2 changes: 1 addition & 1 deletion zigate/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#


__version__ = '0.40.3'
__version__ = '0.40.4'

0 comments on commit 64d60df

Please sign in to comment.