Cover / Shutter via MQTT warning appeared in 2021.3.0

After upgrading HA to 2021.3.0 (still happening in 2021.3.2), my Shelly covers/shutters throw a warning that I don’t see possible to fix.

My Shelly cover is defined in that way:

cover:
  - platform: mqtt
    name: Persiana Estudio
    state_topic: "shellies/shellyswitch25-C4E089/roller/0"
    command_topic: "shellies/shellyswitch25-C4E089/roller/0/command"
    position_topic: "shellies/shellyswitch25-C4E089/roller/0/pos"
    set_position_topic: "shellies/shellyswitch25-C4E089/roller/0/command/pos"
    payload_available: "true"
    payload_not_available: "false"
    device_class: shutter
    qos: 1
    retain: false
    optimistic: false
    payload_open: "open"
    payload_close: "close"
    payload_stop: "stop"
    position_open: 100
    position_closed: 0

I receive this warning everytime i open my cover:

Payload is not supported (e.g. open, closed, opening, closing, stopped): stop

I receive these warnings everytime i close my cover:

Payload is not supported (e.g. open, closed, opening, closing, stopped): close
Payload is not supported (e.g. open, closed, opening, closing, stopped): stop

I don’t know how to fix this, because my shelly sends these MQTT messages when its state changes and I can’t do anything to change it. Any idea?

I’m having the same issue, plus in my case, even if position is 0, cover is showed as “Open” or “Unknown”, is not possible to get to closed state anymore…

Same problem and same error message here. After setting up a new hass installation 2021.12.10 the state of the covers is not correnty shown.
Any suggestions?

depending how you manage your shellys into HA. but old shelly firmware must be updated …

My shellies are integrated via mqtt.

Current shelly firmware is 20200827-065456/v1.8.3
Available firmware is 20211109-125214/v1.11.7

Will try the new firmware in a second…

Edit: Also with the new firmware, no luck. Same error message.

all my shelly use mqtt … (to much issues with coap)
I used this method → Shellies Discovery Script
script versions and firmware versions evolve, they need to respect each other minimum versions.

Ok, will try that later. If i use this script, does that mean i have to remove the mqtt configuration from my configuration.yaml?

I have decided to patch the mqtt/covers.py so that the payload from shelly gets correctly interpreted.

Hi @somebody,

Can you share more info about your patch ?
I’m on the same scenario even with shelly discoveries or mqtt and it’s bothering me.

Thanks,

I have made the following dirty hack, so that the states are nearly interpreted correctly. This solves the problem for me.

diff /srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/mqtt/cover.py_ /srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/mqtt/cover.py
61,62c61,62
< CONF_STATE_CLOSED = "state_closed"
< CONF_STATE_CLOSING = "state_closing"
---
> CONF_STATE_CLOSED = "state_close"
> CONF_STATE_CLOSING = "state_close"
64,65c64,65
< CONF_STATE_OPENING = "state_opening"
< CONF_STATE_STOPPED = "state_stopped"
---
> CONF_STATE_OPENING = "state_open"
> CONF_STATE_STOPPED = "state_stop"
83c83
< DEFAULT_STATE_STOPPED = "stopped"
---
> DEFAULT_STATE_STOPPED = "stop"

This should only be considered as workaround.