From 08d40d132b3341e4b0fd756ae9c2696c9d1535ff Mon Sep 17 00:00:00 2001 From: SebClem Date: Sat, 12 Mar 2022 22:14:31 +0100 Subject: [PATCH] :hammer: Change sensor name --- mqtt_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mqtt_client.py b/mqtt_client.py index 0188da9..72b51a8 100644 --- a/mqtt_client.py +++ b/mqtt_client.py @@ -106,9 +106,9 @@ class MqttClient: }, "entity_category": category, "icon": icon, - "name": name, - "unique_id": self.device_id + "_" + unique_id, - "object_id": safe_name + "_" + unique_id + "name": f"{self.device_name} {name}", + "unique_id": f"{self.device_id} {unique_id}", + "object_id": f"{safe_name} {unique_id}" } if additional_data: payload.update(additional_data)