From 7cc7e64e6546792cfbb3ede19b5f8cb977ae95f8 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 7 Oct 2023 17:42:57 +0200 Subject: [PATCH] fix HA entity name prefix warnings (closes #1011) --- contrib/etc/ebusd/mqtt-hassio.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/etc/ebusd/mqtt-hassio.cfg b/contrib/etc/ebusd/mqtt-hassio.cfg index 883e4c93..83d53dc1 100644 --- a/contrib/etc/ebusd/mqtt-hassio.cfg +++ b/contrib/etc/ebusd/mqtt-hassio.cfg @@ -311,7 +311,7 @@ definition-topic ?= %haprefix/%type_topic/%{TOPIC}_%FIELD/config # HA integration: this is the config topic payload for HA's MQTT discovery. definition-payload = { "unique_id":"%{TOPIC}_%FIELD", - "name":"%prefixn %circuit %name %fieldname", + "name":"%name %fieldname", "device":%circuit_part, "value_template":"{{value_json[\"%field\"].value}}", "state_topic":"%topic"%field_payload @@ -340,7 +340,7 @@ global_prefix = { "unique_id":"%TOPIC", "device":%global_device, "state_topic":"%topic", - "name":"%prefixn %name" + "name":"global %name" # HA integration: boolean suffix for global parts global_boolean_suffix = , @@ -387,7 +387,7 @@ def_global_updatecheck_device-payload = { "suggested_area":"%area" }, "state_topic":"%topic", - "name":"%prefixn %name", + "name":"%name", "value_template":"{%% set my_new = value_json|truncate(255)|regex_replace(find='^[^,]*|, device firmware |,.*| available',replace='') %%}{%% set my_cur = 'old' %%}{%% if my_new == '' %%}{%% set my_new = 'current' %%}{%% set my_cur = 'current' %%}{%% endif %%}{{ {'installed_version':my_cur,'latest_version':my_new,'entity_picture':'https://adapter.ebusd.eu/favicon.ico','release_url':'https://adapter.ebusd.eu/firmware/ChangeLog'} | tojson }}" }