Docker container for the DHT11/DHT22/AM2302 sensors, able to relay sensor readings to a MQTT broker. Integrates with HomeAssistants' discovery protocol and incorporates a robust outlier detection scheme. All features are configurable, where the container can be used to simply log data too.
My MQTT broker requires authentication.
I wrote
if mqtt_username:
instead ofif mqtt_username and mqtt_password:
or similar because the password is optional: https://github.com/eclipse/paho.mqtt.python/blob/v1.5.1/src/paho/mqtt/client.py#L1318