MQTT Cover configuration with only 'position'

Hello,

I’m trying to configure my sun-screens, but I am stuck at the message:

Payload is not supported (e.g. open, closed, opening, closing, stopped): { “state” : “CLOSE”, “position”: 100 }

I created home automation via a PLC.
The only thing the screens need as an input, is the ‘position’ (0 being ‘open’, 100 being ‘closed’)

This is the configuration I’m trying to use (compiled from several topics on this forum and the manual) (tried to understand what’s happening in the python-code but I need to sharpen those skills I’m afraid)

- platform: mqtt
  unique_id: "scrn_v2_bureau_mqtt"
  name: "screen v2 bureau"
  command_topic: "test/SCRN_V2_BUREAU/set"
  position_topic: "test/SCRN_V2_BUREAU/get"
  set_position_topic: "test/SCRN_V2_BUREAU/set"
  position_template: "{{ value_json.position }}"
  position_open: 100
  position_closed: 0
  state_topic: "test/SCRN_V2_BUREAU/get"
  payload_open: '{ "state": "OPEN", "position": 0 }'
  payload_close: '{ "state": "CLOSE", "position": 100 }'

The payload I am putting into MQTT is:

{ "state" : "CLOSE", "position": 100 }

or

{ "state" : "OPEN", "position": 0 }

(content of the payload can be modified to add or remove entities if necessary)

Could you help me out with this one?

Thanks,

Jan

Yess, solved it!

It seems I didn’t need so many configuration options.
Remaining config (for whom it might be interesting):

- platform: mqtt
  unique_id: "scrn_v2_bureau_mqtt"
  name: "screen v2 bureau"
  position_topic: "test/SCRN_V2_BUREAU/get"
  set_position_topic: "test/SCRN_V2_BUREAU/set"

Values received via MQTT are just the position (‘0’ or ‘50’ or ‘100’)

– Jan