From 64d60dfa59714dafa0ea1109d4001817afa9fe5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20RAMAGE?= Date: Sun, 16 Aug 2020 08:44:12 +0200 Subject: [PATCH] add more quirks --- zigate/core.py | 13 +++++++++++++ zigate/version.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/zigate/core.py b/zigate/core.py index 0bececfc..cd991eb3 100644 --- a/zigate/core.py +++ b/zigate/core.py @@ -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}) diff --git a/zigate/version.py b/zigate/version.py index a1948701..884dfd61 100644 --- a/zigate/version.py +++ b/zigate/version.py @@ -6,4 +6,4 @@ # -__version__ = '0.40.3' +__version__ = '0.40.4'