From da04d223b446000df5cc59ccb38115eb3e5eac96 Mon Sep 17 00:00:00 2001 From: Der Mundschenk & Compagnie Date: Fri, 10 Nov 2023 21:41:36 +0100 Subject: [PATCH] fix: Fix invalid JSON error in Home Assistant update entity (#19659) --- lib/extension/homeassistant.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index a6b50e36..a910d391 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -1200,7 +1200,7 @@ export default class HomeAssistant extends Extension { latest_version_template: `{{ value_json['update']['latest_version'] }}`, json_attributes_topic: `${settings.get().mqtt.base_topic}/${entity.name}`, // state topic json_attributes_template: - `{{ {'in_progress': value_json['update']['state'] == 'updating'} | tojson }}`, + `{'in_progress': {{ iif(value_json['update']['state'] == 'updating', 'true', 'false') }} }`, }, }; configs.push(updateSensor);