From 91484ad4ee81a490dfaae3366857f7f61d784339 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 11 Dec 2022 18:06:48 +0100 Subject: [PATCH] switch to HA update integration for updatecheck --- contrib/etc/ebusd/mqtt-hassio.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/etc/ebusd/mqtt-hassio.cfg b/contrib/etc/ebusd/mqtt-hassio.cfg index 5162aa1a..b067a124 100644 --- a/contrib/etc/ebusd/mqtt-hassio.cfg +++ b/contrib/etc/ebusd/mqtt-hassio.cfg @@ -349,9 +349,9 @@ def_global_signal-topic = %haprefix/binary_sensor/%TOPIC/config def_global_signal-payload = %global_prefix, "device_class":"connectivity"%global_boolean_suffix +def_global_updatecheck-topic = %haprefix/update/%TOPIC/config def_global_updatecheck-payload = %global_prefix, - "state_class":"measurement", - "value_template":"{{value_json|truncate(255)}}" + "value_template":"{%% set my_vernum = value_json|truncate(255)|regex_replace(find=',.*| available|revision v|version v',replace='') %%}{%% set my_ver = {'installed_version':'%version','latest_version':my_vernum,'entity_picture':'https://ebusd.eu/logo-32x32.png','release_url':'https://github.com/john30/ebusd/releases/latest'} %%}{%% if my_vernum == '' %%}{%% set my_ver.latest_version = '%version' %%}{%% endif %%}{{ my_ver | tojson }}" } # the topic and payload to listen to in order to republish all config messages.