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.