MQTT topic payload as dashboard UI card

I am running;

  • Core 2023.11.1
  • Supervisor 2023.11.0
  • Operating System 11.1
  • Frontend 20231030.1

And am having no luck implementing to get a dashboard card to display a payload value of an mqtt topic.

But which ever syntax I try I get errors in the visual studio code server while editing the configuration.yaml.

syntax found in an earlier thread I posted this to as well

 - platform: mqtt
    state_topic: "tele/tasmota_16CDAC/SENSOR"
    name: "tasmota_16CDAC SENSOR"

results in

syntax found at MQTT Sensor - Home Assistant

mqtt:
  - sensor:
      name: "RSSI"
      state_topic: "home/sensor1/infojson"

same errors

I am pretty sure the indentation is correct.

Can anyone please help me get through this?

this Is my setup

in my config file I have

mqtt:
  sensor: !include_dir_merge_list mqtt/sensor/
  climate: !include_dir_merge_list mqtt/climate/
  binary_sensor: !include_dir_merge_list mqtt/binary_sensor/
  switch: !include_dir_merge_list mqtt/switch/
  light: !include_dir_merge_list mqtt/light/
  fan: !include_dir_merge_list mqtt/fan/

then

in the sensor file I have

  - name: "feeder ds18b20 temperature"
    state_topic: "tele/Feeder/SENSOR"
    value_template: "{{value_json['DS18B20'].Temperature }}"
    unit_of_measurement: "°C"
  - name: MQTT Clients Total
    state_topic: $SYS/broker/clients/total
  - name: MQTT Clients Connected
    state_topic: $SYS/broker/clients/connected

sweet thank you. No more syntax errors.