Cover for DIY roller shade not working

i followed the HookUp channel and happy to say i got it working.
sadly when it’s time to add into HA, i got error…
Invalid config for [cover.mqtt]: ‘value_template’ must be set together with ‘state_topic’… Got OrderedDict([(‘platform’, ‘mqtt’), (‘name’, ‘Roller 3’), (‘command_topic’, ‘/raw/esp8266/14521705/in’), (‘set_position_topic’, ‘/raw/esp8266/14521705/in’), (‘position_topic’, ‘/raw/esp8266/14521705/out’), (‘value_template’, ‘{{ value_json.position }}’), (‘json_attributes_topic’, ‘/raw/esp8266/14521705/out’), (‘json_attributes_template’, ‘{{ value_json.position | tojson }}’), (‘retain’, False), (‘payload_open’, ‘100’), (‘payload_close’, ‘0’), (‘position_open’, 100), (‘position_closed’, 0)]). (See /config/configuration.yaml, line 15). Please check the docs at MQTT - Home Assistant

cover:
  - platform: mqtt
    name: "Roller_3"
    command_topic: "/raw/esp8266/14521705/in"
    set_position_topic: "/raw/esp8266/14521705/in"
    position_topic: "/raw/esp8266/14521705/out"
    value_template: "{{ value_json.position }}"
    json_attributes_topic: "/raw/esp8266/14521705/out"
    json_attributes_template: "{{ value_json.position | tojson }}"
    retain: false
    payload_open: "100"
    payload_close: "0"
    position_open: 100
    position_closed: 0

did something changed recently since his video?

i mod the code as i saw from googling. error went away but HA has no idea where the roller shade’s position is. lol. it doesnt know if shade is fully opened, half way, or fully closed…

cover:
  - platform: mqtt
    name: "Roller_3"
    command_topic: "/raw/esp8266/14521705/in"
    set_position_topic: "/raw/esp8266/14521705/in"
    position_topic: "/raw/esp8266/14521705/out"
    json_attributes_topic: "/raw/esp8266/14521705/out"
    json_attributes_template: "{{ value_json.position | tojson }}"
    state_topic: "/raw/esp8266/14521705/out"
    state_open: "closed"
    state_closed: "open"
    value_template: "{{ value_json.position }}"
    retain: false
    payload_open: "100"
    payload_close: "0"
    position_open: 100
    position_closed: 0