From df2256b9350b96db821306b30250367d8a181fac Mon Sep 17 00:00:00 2001 From: Lennard Klein <1254068+lennardk@users.noreply.github.com> Date: Mon, 5 Nov 2018 22:20:05 +0100 Subject: [PATCH] Make 'online' message retained again When a consumer starts after py-otgw-mqtt, it previously received the last-will 'offline' message from the top level topic, even while py-otgw-mqtt is still running. --- __main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__main__.py b/__main__.py index 10d9b7f..dc2819f 100644 --- a/__main__.py +++ b/__main__.py @@ -53,7 +53,7 @@ def on_mqtt_connect(client, userdata, flags, rc): topic=opentherm.topic_namespace, payload="online", qos=settings['mqtt']['qos'], - retain=settings['mqtt']['retain']) + retain=True) def on_mqtt_message(client, userdata, msg): # Handle incoming messages