Cover MQTT broke after updating - 'value_template' must be set together with 'state_topic'

After updating to core-2021.7.3 and supervisor-2021.06.8 my cover MQTT suddenly stopped working. I receive the following error: Invalid config for [cover.mqtt]: ‘value_template’ must be set together with ‘state_topic’.
I have the following setup in my configuration.yaml:
cover:

  • platform: mqtt
    name: " Roller Shade1"
    command_topic: “/raw/esp8266/702539/in”
    set_position_topic: “/raw/esp8266/702539/in”
    position_topic: “/raw/esp8266/702539/out”
    value_template: “{{ value_json.position }}”
    json_attributes_topic: “/raw/esp8266/702539/out”
    json_attributes_template: “{{ value_json.position | tojson }}”
    retain: false
    payload_open: “100”
    payload_close: “0”
    position_open: 100
    position_closed: 0
    I cannot find anything in the changelog that describe a breaking cover mqtt changes. Any helps / ideas will be received with great pleasure!
    BR,
    Lars

I know they have been doing some clean up work with the MQTT cover integration recently
so its possible what use to work for you, perhaps by accident, may no longer work.
I think what you need to do is to add a state_topic and use the value_template with your state topic.
For your position value, use position_template instead.

Here would be a suggestion for the state configuration:

    state_topic: "/raw/esp8266/702539/out"
    state_open: "closed"
    state_closed: "open"
    value_template: '{% if value_json.position == 0 -%}closed{%- else -%}open{%- endif %}'

Thanks a lot! That did the trick