From b6370b51da5bb9a14846e64073b98e45fdf9f64e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 30 Nov 2022 01:24:35 +0100 Subject: [PATCH] Extended humidity sensors detection for zigbee.mqtt --- platypush/plugins/zigbee/mqtt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/zigbee/mqtt/__init__.py b/platypush/plugins/zigbee/mqtt/__init__.py index 3e798594b4..4a227b4b39 100644 --- a/platypush/plugins/zigbee/mqtt/__init__.py +++ b/platypush/plugins/zigbee/mqtt/__init__.py @@ -1598,7 +1598,7 @@ class ZigbeeMqttPlugin(MqttPlugin): # lgtm [py/missing-call-to-init] entity_type = VoltageSensor elif exposed.get('property', '').endswith('temperature'): entity_type = TemperatureSensor - elif exposed.get('property', '').endswith('humidity'): + elif re.search(r'(humidity|moisture)$', exposed.get('property' '')): entity_type = HumiditySensor elif exposed.get('type') == 'binary': entity_type = BinarySensor