Mqtt cover discovery don't support payload_stop

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
  trigger:
    - platform: mqtt
      topic: 'domoticz/out'
  condition:
    condition: template
    # value_template: '{{ trigger.payload_json.dtype == "Light/Switch" }}'
    value_template: '{{ trigger.payload_json.dtype == "RFY" }}'
  action:
    - service: mqtt.publish
      data_template:
        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
      data_template:
        topic: 'homeassistant/cover/dz_switch_{{ trigger.payload_json.idx }}/config'
        retain: true
        payload_template: '{"name":"{{ trigger.payload_json.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 %}'
cover:
  - 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
cover:
  - platform: mqtt
    name: "MQTT Cover"
    command_topic: "home-assistant/cover/set"
    state_topic: "home-assistant/cover/state"
    position_topic: "home-assistant/cover/position"
    availability:
      - 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 }}"
1 Like

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.

This worked for me too. Added state_stopped setting and warnings desappeared from my log.

Thank you for tip.

1 Like

Thanks!

Changing stopped to stop in state_stopped solved this for me
Also, changing closed to close in state_closed solves a similar entry in log about close when clicking “close” in HA’s shutter panel

1 Like

zwavejs2mqtt is causing the same errors with the NGD00Z-4.
The device JSON looks like:

{
  "type": "cover",
  "object_id": "barrier_state",
  "discovery_payload": {
    "position_topic": "homeassistant/Dons_Garage_Door/102/0/currentState",
    "state_topic": "homeassistant/Dons_Garage_Door/102/0/currentState",
    "command_topic": "homeassistant/Dons_Garage_Door/102/0/targetState/set",
    "position_template": "{{ value_json.value }}",
    "device_class": "garage",
    "payload_open": 255,
    "payload_close": 0,
    "payload_stop": 253,
    "state_open": 255,
    "state_opening": 254,
    "state_closed": 0,
    "state_closing": 252,
    "device": {
      "identifiers": [
        "zwavejs2mqtt_0xefa976a8_node44"
      ],
      "manufacturer": "Nortek Security & Control LLC",
      "model": "Garage Door Controller (NGD00Z-4)",
      "name": "Dons_Garage_Door",
      "sw_version": "2.0"
    },
    "name": "Dons_Garage_Door_barrier_state",
    "unique_id": "zwavejs2mqtt_0xefa976a8_44-102-0-currentState"
  },
  "discoveryTopic": "cover/Dons_Garage_Door/barrier_state/config",
  "values": [
    "102-0-currentState",
    "102-0-targetState"
  ],
  "persistent": true,
  "ignoreDiscovery": false,
  "id": "cover_barrier_state"
}

What’s the correct way to eliminate the
Payload is not supported (e.g. open, closed, opening, closing, stopped)
messages?