Skip to content

Commit

Permalink
fix: Fix Home Assistant in_progress Erroneous JSON error #19597
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Nov 8, 2023
1 parent 354ada5 commit 2540fbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/extension/homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,8 @@ export default class HomeAssistant extends Extension {
value_template: `{{ value_json['update']['installed_version'] }}`,
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' }}}`,
json_attributes_template:
`{{ {'in_progress': value_json['update']['state'] == 'updating'} | tojson }}`,
},
};
configs.push(updateSensor);
Expand Down

0 comments on commit 2540fbd

Please sign in to comment.