From 4820075a4fc3c4d88e9116555d6724649cdee4dc Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Fri, 25 Feb 2022 18:31:04 +0100 Subject: [PATCH] Fix firmware sesnor attributes (#46) --- python_scripts/shellies_discovery_gen2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_scripts/shellies_discovery_gen2.py b/python_scripts/shellies_discovery_gen2.py index 57d7904..99c027f 100644 --- a/python_scripts/shellies_discovery_gen2.py +++ b/python_scripts/shellies_discovery_gen2.py @@ -150,7 +150,7 @@ TPL_ETH_IP = "{{value_json.result.eth.ip}}" TPL_FIRMWARE_STABLE = "{%if value_json.result.sys.available_updates.stable is defined%}ON{%else%}OFF{%endif%}" TPL_FIRMWARE_STABLE_ATTRS = ( - "{{value_json.result.sys.available_updates.get(^stable^, {})}}" + "{{value_json.result.sys.available_updates.get(^stable^, {})|to_json}}" ) TPL_INPUT = "{%if value_json.state%}ON{%else%}OFF{%endif%}" TPL_MQTT_CONNECTED = (