MQTT cover no slider

Hi, I’m new using homeassistant. I’m trying to implement a Shelly 2 device over MQTT. It’s in a seperate folder for covers.

My configuration:

  • platform: mqtt
    name: “MQTT test cover”
    qos: 0
    retain: true
    optimistic: false
    state_topic: “shellies/shellyswitch-5B23AA/roller/0”
    command_topic: “shellies/shellyswitch-5B23AA/roller/0/command”
    payload_open: “open”
    payload_close: “close”
    payload_stop: “stop”
    position_topic: “shellies/shellyswitch-5B23AA/roller/0/pos”
    set_position_topic: “shellies/shellyswitch-5B23AA/roller/0/command/pos”
    position_closed: 100
    position_open: 0
    #tilt_status_topic: “shellies/shellyswitch-5B23AA/roller/0/pos”
    #tilt_command_topic: “shellies/shellyswitch-5B23AA/roller/0/command/pos”
    #tilt_min: 0
    #tilt_max: 100
    #tilt_closed_value: 0
    #tilt_opened_value: 100
    value_template: ‘{{ value.x }}’

image

Log:
2019-04-10 20:31:13 WARNING (MainThread) [homeassistant.components.mqtt.cover] Payload is not integer within range:
2019-04-10 20:31:14 WARNING (MainThread) [homeassistant.components.mqtt.cover] Payload is not integer within range:

I tried it with the tilt option and its working but I do not understand why the slider for position is not appearing.

Thanks in advance

It’s working with the following config:

  • platform: mqtt
    name: “MQTT test cover”
    qos: 0
    retain: true
    optimistic: false
    state_topic: “shellies/shellyswitch-5B23AA/roller/0”
    command_topic: “shellies/shellyswitch-5B23AA/roller/0/command”
    payload_open: “open”
    payload_close: “close”
    payload_stop: “stop”
    state_open: “open”
    payload_closed: “closed”
    position_topic: “shellies/shellyswitch-5B23AA/roller/0/pos”
    set_position_topic: “shellies/shellyswitch-5B23AA/roller/0/command/pos”
    position_closed: 0
    position_open: 100

image

It’s inadvisable to use retain: true for a cover. It means a command, sent to command_topic, will be retained (stored) by the MQTT broker. If the broker or the Shelly device restarts, the Shelly will receive the stored command again and may cause the door to open or close unexpectedly.