From 389e8c0f40cace5124eb5d442c031f8927977c0f Mon Sep 17 00:00:00 2001 From: lolouk44 Date: Thu, 2 Jul 2020 09:59:01 +0100 Subject: [PATCH] Retain discovery --- src/Xiaomi_Scale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xiaomi_Scale.py b/src/Xiaomi_Scale.py index aa7ed66..017a5be 100644 --- a/src/Xiaomi_Scale.py +++ b/src/Xiaomi_Scale.py @@ -102,7 +102,7 @@ def discovery(): publish.single( MQTT_DISCOVERY_PREFIX + '/sensor/' + MQTT_PREFIX + '/' + MQTTUser + '/config', message, - retain=False, + retain=True, hostname=MQTT_HOST, port=MQTT_PORT, auth={'username':MQTT_USERNAME, 'password':MQTT_PASSWORD}