MQTT Cover - State not working

Hi folks,

hope you have an idea with controlling a cover via MQTT. Everything is working fine as long as I do NOT add the state to the configuration. Afterwards the state will be not changed anymore, and always shows “unknown”.

First of all, here is the piece of the configuration.yaml:
cover:
- platform: mqtt
name: “Cover Kitchen”
command_topic: “wifiRelay/KitchenBlind/set”
state_topic: “wifiRelay/KitchenBlind/state”
qos: 0
retain: true
payload_open: “UP,18000,0”
payload_close: “DOWN,19000,2000”
state_open: “open”
state_closed: “closed”
optimistic: false
value_template: ‘{{ value.x }}’
tilt_command_topic: ‘wifiRelay/KitchenBlind/tilt’
tilt_status_topic: ‘wifiRelay/KitchenBlind/tilt-state’
tilt_min: 0
tilt_max: 19000
tilt_closed_value: 0
tilt_opened_value: 100

This looks like this in the GUI:
53

And here, how it looks under the “states” section:
36

So, when the I press the button in the GUI or even, if the hardware button of the cover is pressed, a MQTT state message is send: See here:
10

BUT, the HA info panel show me this error message in the log:
25

I also tried it with “true”, “1”, but I got the same error message.

Does anyone have an idea?

I got it. Just delete

value_template: ‘{{ value.x }}’

and everything works fine.