forked from platypush/platypush
Support for illuminance sensor entities on zigbee.mqtt
This commit is contained in:
parent
09d70e2ff1
commit
1ab85f99d9
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,7 @@ from platypush.entities.electricity import (
|
||||||
VoltageSensor,
|
VoltageSensor,
|
||||||
)
|
)
|
||||||
from platypush.entities.humidity import HumiditySensor
|
from platypush.entities.humidity import HumiditySensor
|
||||||
|
from platypush.entities.illuminance import IlluminanceSensor
|
||||||
from platypush.entities.lights import Light
|
from platypush.entities.lights import Light
|
||||||
from platypush.entities.linkquality import LinkQuality
|
from platypush.entities.linkquality import LinkQuality
|
||||||
from platypush.entities.sensors import (
|
from platypush.entities.sensors import (
|
||||||
|
@ -1600,6 +1601,8 @@ class ZigbeeMqttPlugin(MqttPlugin): # lgtm [py/missing-call-to-init]
|
||||||
entity_type = TemperatureSensor
|
entity_type = TemperatureSensor
|
||||||
elif re.search(r'(humidity|moisture)$', exposed.get('property' '')):
|
elif re.search(r'(humidity|moisture)$', exposed.get('property' '')):
|
||||||
entity_type = HumiditySensor
|
entity_type = HumiditySensor
|
||||||
|
elif re.search(r'(illuminance|luminosity)$', exposed.get('property' '')):
|
||||||
|
entity_type = IlluminanceSensor
|
||||||
elif exposed.get('type') == 'binary':
|
elif exposed.get('type') == 'binary':
|
||||||
entity_type = BinarySensor
|
entity_type = BinarySensor
|
||||||
sensor_args['value'] = sensor_args['value'] == exposed.get(
|
sensor_args['value'] = sensor_args['value'] == exposed.get(
|
||||||
|
|
Loading…
Reference in a new issue