Skip to content

Commit

Permalink
fix: Add in_progress attribute for Home Assistant update sensor (#19207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxilef committed Oct 8, 2023
1 parent de7736a commit cdce6b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/extension/homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,8 @@ export default class HomeAssistant extends Extension {
payload_install: `{"id": "${entity.ieeeAddr}"}`,
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' }}"}`,
},
};
configs.push(updateSensor);
Expand Down

0 comments on commit cdce6b1

Please sign in to comment.