sensor.dht
Platypush documentation
sensor.dht
- class platypush.backend.sensor.dht.SensorDhtBackend(temperature: bool = True, humidity: bool = True, **kwargs)[source]
Bases:
SensorBackend
Backend to poll a DHT11/DHT22/AM2302 temperature/humidity sensor.
Requires:
Adafruit_Python_DHT
(pip install git+https://github.com/adafruit/Adafruit_Python_DHT.git
)The
gpio.sensor.dht
plugin configured and enabled.
Triggers:
platypush.message.event.sensor.SensorDataChangeEvent
if the measurements of a sensor have changedplatypush.message.event.sensor.SensorDataAboveThresholdEvent
if the measurements of a sensor havegone above a configured threshold
platypush.message.event.sensor.SensorDataBelowThresholdEvent
if the measurements of a sensor havegone below a configured threshold