Skip to content

Commit

Permalink
fix(hass): remove state_topic on covers for HA 2020.3.2 (#881)
Browse files Browse the repository at this point in the history
* remove state_topic

* Add also position_template definition
  • Loading branch information
varet80 authored Mar 15, 2021
1 parent 98e145d commit 2ab3d97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -1737,12 +1737,11 @@ Gateway.prototype.discoverValue = function (node, vId) {
].includes(specificDeviceClass)
) {
cfg = copy(hassCfg.cover_position)
cfg.discovery_payload.state_topic = getTopic
cfg.discovery_payload.command_topic = setTopic
cfg.discovery_payload.position_topic = getTopic
cfg.discovery_payload.set_position_topic =
cfg.discovery_payload.command_topic
cfg.discovery_payload.value_template =
cfg.discovery_payload.position_template =
'{{ value_json.value | round(0) }}'
cfg.discovery_payload.position_open = 99
cfg.discovery_payload.position_closed = 0
Expand Down

0 comments on commit 2ab3d97

Please sign in to comment.