Mqtt cover discovery don't support payload_stop

Tags: #<Tag:0x00007fc4180df2f8>

hello everybody
I hope you have health as your relatives
i trie to create covers with mqtt discovery and automation.
my blinds have 3 positions. Open Stop Close
but when i want to create my automation i have this error (HA 0.108.3 /docker)

2020-04-13 23:07:46 WARNING (MainThread) [homeassistant.components.mqtt.cover] Payload is not supported (e.g. open, closed, opening, closing): STOP
2020-04-13 23:13:37 WARNING (MainThread) [homeassistant.components.mqtt.cover] Payload is not supported (e.g. open, closed, opening, closing): STOP

but the mqtt covers documentation say that payload_stop exist

can you help me please?
my automation (thanks rimram31)

- id: domoticz_RFY_state
  alias: domoticz_RFY_state
  initial_state: true
    - platform: mqtt
      topic: 'domoticz/out'
    condition: template
    # value_template: '{{ trigger.payload_json.dtype == "Light/Switch" }}'
    value_template: '{{ trigger.payload_json.dtype == "RFY" }}'
    - service: mqtt.publish
        topic: 'homeassistant/cover/dz_switch_{{ trigger.payload_json.idx }}/state'
        retain: true
        payload_template: '{% if trigger.payload_json.nvalue == 1 %} OPEN {% elif trigger.payload_json.nvalue == 2 %} CLOSE {% else %} STOP {% endif %}'
    - condition: template
      value_template: '{{ states("switch.dz_switch_"+trigger.payload_json.idx|string) == "unknown" }}'
    - service: mqtt.publish
        topic: 'homeassistant/cover/dz_switch_{{ trigger.payload_json.idx }}/config'
        retain: true
        payload_template: '{"name":"{{|string }} (dz)","command_topic":"homeassistant/cover/dz_switch_{{ trigger.payload_json.idx|string }}/power","state_topic":"homeassistant/cover/dz_switch_{{ trigger.payload_json.idx|string }}/state","payload_close":"CLOSE","payload_open":"OPEN","payload_stop":"STOP"}'
1 Like

Did you ever get a resolution to this? I’m running into similar with a GD00Z-4 garage door opener.

that work for me

      payload_template: '{% if trigger.payload_json.nvalue == 1 %} opening {% elif trigger.payload_json.nvalue == 3 %} closed {% endif %}'
  - platform: mqtt
    name: "Awning"
    availability_topic: "home/nodemcu/somfy/awning/status"
    state_topic: "home/nodemcu/somfy/awning/state"
    command_topic: "home/nodemcu/somfy/awning"
    qos: 1
    payload_open: "u"
    payload_stop: "s"
    payload_close: "d"
    retain: true

I’m having the same issue. Cover works perfectly, but every time I issue the stop command I get this error in the logs:

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

Running into the same problem using a Sonoff Dual R2 Module with the newest tasmota flashed on it

This tasmota has been set as a shutter and everthing is working except for this error flushing my home assistant core log

2021-03-07 17:18:15 WARNING (MainThread) [homeassistant.components.mqtt.cover] Payload is not supported (e.g. open, closed, opening, closing, stopped)

It’s a auto discovered device so there is no yaml config for this device.

Have been searching the internet for a solution but couldn’t find any topic related to this warning.

Having the same problem with a Shelly 2.5 over MQTT. So it seems to be a general issue.
Probably an issue should be filed on Github? But this one confuses me a bit. Is the problem in our case probably somewhere else, too?! Everything is internal on MQTT-usage, I’d say?!

I also have the same issue, I see such a warning every 30 seconds in my log.

I am not yet able to figure out where it comes from. I even removed all custom_components and most of the config, but still this warning shows up every 30 seconds.

I found this topic while looking for the same warning message.
I removed state_topic from my configuration and the warning has stopped.

Earlier, I changed value_topic to position_topic as per the 2021.3 deprecation announcement.

had the same problem. Have you tried to include state_stopped into your configuration? this worked for me…

there is a difference between state_stopped and payload_stop… (MQTT Cover - Home Assistant)

with my shelly’s i had to use “stop” for state_stopped…

# Example configuration.yaml entry
  - platform: mqtt
    name: "MQTT Cover"
    command_topic: "home-assistant/cover/set"
    state_topic: "home-assistant/cover/state"
    position_topic: "home-assistant/cover/position"
      - topic: "home-assistant/cover/availability"
    qos: 0
    retain: true
    payload_open: "OPEN"
    payload_close: "CLOSE"
    payload_stop: "STOP"
    state_opening: "opening"
    state_closed: "closed"
    state_stopped: "stop"
    payload_available: "online"
    payload_not_available: "offline"
    optimistic: false
    value_template: "{{ value.x }}"
    position_template: "{{ value.y }}"

An update to my last post… Removing state_topic not only removed the warning, but the cover state didn’t report at all… not too surprisingly, I guess.
I’m unsure why the docs still say value_template is fine, but the release deprecated it. I needed both state_topic and value_template for it to work…
Wait, it actually says it’s only deprecated for position (not state):

MQTT cover value_template is deprecated to use for extracting position, support will be removed in Home Assistant Core 2021.6

I guess the thing that’s wrong is actually the VS Code error :slight_smile: (or I’ve misunderstood it again)

When I had position_topic and position_template, I got: Payload 'open' is not numeric since my state is open/closed, not a numeric position.