core: Undocumented change in mqtt cover in 0.82.0 & open/closed position does not work

Home Assistant release with the issue: 0.82.0

Last working Home Assistant release (if known): 0.81.6

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io

Component/platform: https://www.home-assistant.io/components/cover.mqtt/

Description of problem: My mqtt cover returns current position from 0 (cover open - all the way up) to 100 (cover closed - all the way down) in mqtt topic e.g. “klara/cover1/state”. For this, I have configured state_topic: "klara/cover1/state" It was probably not correct, but it worked.

It seems that in 0.82.0 this was changed to a more correct set-up, where state_topic should only report “open” and “closed”, and there is new topic position_topic for position updates. But there are few issues with that:

  • After the update, the configuration needs to be changed by changing the state_topic to position_topic. But this was not mentioned in the release documentation! Without the change, hassio returns the following error, the covers will not be created, lovelace will render an error with yellow background.

Invalid config for [cover.mqtt]: Set position topic must be set together with get position topic

Use only if not using get_position_topic. State topic can only read open/close state.

Whilst the position_topic says

…Always in favor if used together with state_topic.

Also, the error and manual refers to get_position_topic, but the position is called position_topic.

  • The state_open and state_closed configuration also need to be changed to position_open and position_closed. This is also not mentioned in the release documentation!

  • Finally, the controls for the covers stopped working at the open/closed position. When the cover is in the middle it works fine - the up arrow will roll it up and down arrow will close it. BUT, when it reaches the closed position, it will disable the up arrow, not the down arrow. So it cannot be open anymore (except by the position slider, that works). And vice versa on the open position. Changing position_open and position_closed does not have any effect to this.

  • The position_topic did not work prior to 0.82.0, so there was no easy way to set it up before the upgrade. And the upgrade did not change it, so there is no easy way to do that - upgrade, don’t panic, change config, restart. Or change it up front, but then it will only work after the upgrade. The check configuration add-on did not see the error either.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

cover:
  - platform: mqtt
    name: "Klára dveře"
    command_topic: "klara/cover1/set"
    position_topic: "klara/cover1/state"
    set_position_topic:  "klara/cover1/position"
    payload_open: "open"
    payload_close: "close"
    payload_stop: "stop"
    position_open: 0
    position_closed: 100
    retain: true
    qos: 1

Traceback (if applicable):


Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

That’s ok. You can wait. Hope it’s gonna be working all right for you.