aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mqtt_listener.py
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-11-09 14:11:35 +0100
committerDennis Eriksen <d@ennis.no>2023-11-09 14:11:35 +0100
commite8e33997b360bfee461d5939b7c9fef5f3de6e8c (patch)
tree8f61e55c69edbd6abf140aba462bf535c83e1f22 /scripts/mqtt_listener.py
parentadded new function to get env (diff)
downloadenergyscripts-e8e33997b360bfee461d5939b7c9fef5f3de6e8c.tar.gz
optimize and simplify
- use more fstrings - use exceptions - don't print "oh lol" - drop tempfiles
Diffstat (limited to 'scripts/mqtt_listener.py')
-rw-r--r--scripts/mqtt_listener.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mqtt_listener.py b/scripts/mqtt_listener.py
index 1ff3176..69e62ad 100644
--- a/scripts/mqtt_listener.py
+++ b/scripts/mqtt_listener.py
@@ -33,7 +33,7 @@ tempsensors = [
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, flags, rc):
- print("Connected with result code " + str(rc))
+ print(f"Connected with result code {rc}")
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.