MQTT name problem

HI
i am getting this error from config

Cannot quick reload all YAML configurations because the configuration is not valid: Invalid config for [mqtt]: [name] is an invalid option for [mqtt]. Check: mqtt->mqtt->1->name. (See /config/configuration.yaml, line 25).

with this code

mqtt:
  - climate:
      name: Study
      modes:
      - "off"
      - "heat"
      - "auto"
      temperature_command_topic: "home/termostato/temperature_setpoint/set"
      temperature_state_topic: "home/termostato/temperature_setpoint/state"
      temperature_state_template: "{{ value_json|float / 10  }}"
      current_temperature_topic: "home/termostato/current_temperature/state"
      current_temperature_template: "{{ value_json|float / 10  }}"
      mode_state_topic: "home/termostato/mode/state"
      temperature_unit: c
      max_temp: 30
      min_temp: 15
      temp_step: 0.5
      retain: 1

  - switch:
    name: "Termostato On/Off"
    state_topic: "home/termostato/status/state"
    command_topic: "home/termostato/status/set"
    value_template: "{{ value_json }}"
    payload_on: "1"
    payload_off: "0"
    qos: 0
    retain: true
    icon: mdi:power

  - switch:
    name: "Termostato Away"
    state_topic: "home/termostato/away/state"
    command_topic: "home/termostato/away/set"
    payload_on: "1"
    payload_off: "0"
    qos: 0
    retain: true
    icon: mdi:login

  - sensor:
    name: "termostato_mode"
    state_topic: "home/termostato/mode/state" 
  - sensor:
    name: "termostato_away_temp"
    state_topic: "home/termostato/away_temperature/state"
  - sensor:
    name: "termostato_humedad_actual"
    state_topic: "home/termostato/current_humidity/state"
    value_template: "{{ value_json|int  }}"
    device_class: humidity

Any ideas? Help?

identation no ok, 2 space [name etc]

mqtt:
  - climate:
      name: Study
      modes:
      - "off"
      - "heat"
      - "auto"
      temperature_command_topic: "home/termostato/temperature_setpoint/set"
      temperature_state_topic: "home/termostato/temperature_setpoint/state"
      temperature_state_template: "{{ value_json|float / 10  }}"
      current_temperature_topic: "home/termostato/current_temperature/state"
      current_temperature_template: "{{ value_json|float / 10  }}"
      mode_state_topic: "home/termostato/mode/state"
      temperature_unit: c
      max_temp: 30
      min_temp: 15
      temp_step: 0.5
      retain: 1

  - switch:
      name: "Termostato On/Off"
      state_topic: "home/termostato/status/state"
      command_topic: "home/termostato/status/set"
      value_template: "{{ value_json }}"
      payload_on: "1"
      payload_off: "0"
      qos: 0
      retain: true
      icon: mdi:power

  - switch:
      name: "Termostato Away"
      state_topic: "home/termostato/away/state"
      command_topic: "home/termostato/away/set"
      payload_on: "1"
      payload_off: "0"
      qos: 0
      retain: true
      icon: mdi:login

  - sensor:
      name: "termostato_mode"
      state_topic: "home/termostato/mode/state" 
  - sensor:
      name: "termostato_away_temp"
      state_topic: "home/termostato/away_temperature/state"
  - sensor:
      name: "termostato_humedad_actual"
      state_topic: "home/termostato/current_humidity/state"
      value_template: "{{ value_json|int  }}"
      device_class: humidity
1 Like

genius

thanks