aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mqtt_listener.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mqtt_listener.py')
-rw-r--r--scripts/mqtt_listener.py6
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)
-
+