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.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/mqtt_listener.py b/scripts/mqtt_listener.py
index 3ee688d..1ff3176 100644
--- a/scripts/mqtt_listener.py
+++ b/scripts/mqtt_listener.py
@@ -2,18 +2,17 @@
""" Listen for mqtt-events, and trigger for some """
import json
-import os
from datetime import datetime
import common
import paho.mqtt.client as mqtt
-mqtt_server = os.environ["el_mqtt_server"]
-mqtt_port = int(os.environ["el_mqtt_port"])
-keepalive = int(os.environ["el_mqtt_keepalive"])
-mqtt_topic = os.environ["el_mqtt_topic"]
-mqtt_user = os.environ["el_mqtt_user"]
-mqtt_pass = os.environ["el_mqtt_pass"]
+mqtt_server = common.env("el_mqtt_server")
+mqtt_port = int(common.env("el_mqtt_port"))
+keepalive = int(common.env("el_mqtt_keepalive"))
+mqtt_topic = common.env("el_mqtt_topic")
+mqtt_user = common.env("el_mqtt_user")
+mqtt_pass = common.env("el_mqtt_pass")
tempsensors = [
"Bad Temp",