Extended humidity sensors detection for zigbee.mqtt

This commit is contained in:
Fabio Manganiello 2022-11-30 01:24:35 +01:00
parent 16c24d799d
commit b6370b51da
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 1 additions and 1 deletions

View File

@ -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