From 59cd5abc86c2d4d005a084ebba144ab4c0b73feb Mon Sep 17 00:00:00 2001 From: Hmmbob <33529490+hmmbob@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:04:07 +0200 Subject: [PATCH] Fix for HA 2023.8 and up --- miflora-mqtt-daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miflora-mqtt-daemon.py b/miflora-mqtt-daemon.py index 6837d56..a4fb771 100755 --- a/miflora-mqtt-daemon.py +++ b/miflora-mqtt-daemon.py @@ -330,7 +330,7 @@ def on_publish(client, userdata, mid): for [sensor, params] in parameters.items(): discovery_topic = 'homeassistant/sensor/{}/{}/config'.format(flora_name.lower(), sensor) payload = OrderedDict() - payload['name'] = "{} {}".format(flora_name, sensor.title()) + payload['name'] = "{}".format(sensor.title()) payload['unique_id'] = "{}-{}".format(flora['mac'].lower().replace(":", ""), sensor) payload['unit_of_measurement'] = params['unit'] if 'device_class' in params: