Retain discovery

This commit is contained in:
lolouk44 2020-07-02 09:59:01 +01:00
parent c53ee0147e
commit 389e8c0f40

View file

@ -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}