Skip to content

Commit

Permalink
HA Discovery: cover position template fix
Browse files Browse the repository at this point in the history
ISSUE: #56
  • Loading branch information
harriedegroot committed May 10, 2021
1 parent 1d38002 commit d0d44a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dispatchers/HomeAssistantDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ class HomeAssistantDispatcher {
const payload = {
name: device.name,
unique_id: `${device.id}_${type}`,
value_template: '{{ value }}',
//value_template: '{{ value }}',
};

const hasState = capabilities.hasOwnProperty('windowcoverings_state');
Expand All @@ -676,6 +676,7 @@ class HomeAssistantDispatcher {
if (position) {
const positonTopic = this.normalize ? normalize(position) : position;
payload.position_topic = `${stateTopic}/${positonTopic}`;
payload.position_template = '{{ value }}',
payload.position_closed = capabilities[position].min || 0;
payload.position_open = capabilities[position].max || 100;
if (capabilities[position].setable) {
Expand Down

0 comments on commit d0d44a9

Please sign in to comment.