Help configuration cover

Best wishes to everyone, I need help
I configured a shelly 2 as a cover for a shutter
all right, I added a sensor to see the status but it always tells me unknown.
What am I doing wrong ?
Thanks 1000

  - platform: mqtt
    entity_id: tapletto
    name: "Tapparella camera matrimoniale"
    state_topic: "shellies/shellyswitch-135177/roller/0/status"   
    command_topic: "shellies/shellyswitch-135177/roller/0/command"  
    payload_open: "open"
    payload_close: "close"
    payload_stop: "stop"
    state_open: "open"
    state_closed: "close"
    state_stop: "stop"
    retain: true
    optimistic: false
    qos: 0
    position_open: 100
    position_closed: 0
    value_template: '{{ value.x }}'

- platform: template
        friendly_name: "Stato"
        value_template: '{{states.cover.tapparella_camera_matrimoniale.state}}'