diff options
author | Dennis Eriksen <d@ennis.no> | 2023-11-02 12:44:44 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-11-02 12:44:44 +0100 |
commit | 3eddd39a5aa52d40fbc2e0a12b463d270ddfeba2 (patch) | |
tree | b7f4559cf252a32990f5e462dc09b2a9ad23c9b4 /scripts/mqtt_listener.py | |
parent | add comment about manual starttime (diff) | |
download | energyscripts-3eddd39a5aa52d40fbc2e0a12b463d270ddfeba2.tar.gz |
adding linting with ruff
Diffstat (limited to 'scripts/mqtt_listener.py')
-rw-r--r-- | scripts/mqtt_listener.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/mqtt_listener.py b/scripts/mqtt_listener.py index 48dfc6f..981c40a 100644 --- a/scripts/mqtt_listener.py +++ b/scripts/mqtt_listener.py @@ -1,12 +1,12 @@ #!/usr/bin/env python3 ''' Listen for mqtt-events, and trigger for some ''' -import os import json +import os from datetime import datetime -import paho.mqtt.client as mqtt import common +import paho.mqtt.client as mqtt mqtt_server = os.environ['el_mqtt_server'] mqtt_port = int(os.environ['el_mqtt_port']) @@ -64,7 +64,7 @@ def on_message(client, userdata, msg): common.statein(name, data['temperature'], 'temperature', '°C', verbose=True) if 'humidity' in data: common.statein(name, data['humidity'], 'humidity', '%', verbose=True) - + |