Issue with climate entry in my Hass package file

Hello
I am trying to read and potentially modify, through MQTT, the value of a state variable of my boiler. Here is what I tried, inspired from the BSB-LAN documentation:

climate:
    - name: "Mode opératoire"
      unique_id: bsb_lan_cc2_operating_mode
      state_topic: "BSB-LAN/1000"
      command_topic: "BSB-LAN"
      availability_topic: "BSB-LAN/status"
      payload_on: 1
      payload_off: 0
      modes:
        - auto
        - heat
        - cool
        - "off"
      mode_state_template: >-
        {% set values = { '0 - Mode protection':'off', '1 - Automatique':'auto', '2 - Réduit':'cool', '3 - Confort':'heat'} %}
        {{ values[value] if value in values.keys() else 'off' }}

      mode_command_template: >-
        {% set values = { 'off':'S1000=0', 'auto':'S1000=1', 'cool':'S1000=2', 'heat':'S1000=3'} %}
        {{ values[value] if value in values.keys() else '0' }} 

But when I restart my Home Assistant docker container I get the following error message:

homeassistant  | 2024-02-11 17:32:16.536 ERROR (MainThread) [homeassistant.components.mqtt.mixins] extra keys not allowed @ data['state_topic'] for manually configured MQTT climate item, in /config/chaudiere_package.yaml, line 50 Got {'name': 'Mode opératoire', 'unique_id': 'bsb_lan_cc2_operating_mode', 'state_topic': 'BSB-LAN/1000', 'command_topic': 'BSB-LAN', 'availability_topic': 'BSB-LAN/status', 'payload_on': 1, 'payload_off': 0, 'modes': ['auto', 'heat', 'cool', 'off'], 'mode_state_template': "{% set values = { '0 - Mode protection':'off', '1 - Automatique':'auto', '2 - Réduit':'cool', '3 - Confort':'heat'} %} {{ values[value] if value in values.keys() else 'off' }}", 'mode_command_template': "{% set values = { 'off':'S1000=0', 'auto':'S1000=1', 'cool':'S1000=2', 'heat':'S1000=3'} %} {{ values[value] if value in values.keys() else '0' }} "}

Note: when I query the possible values of BSB-LAN/1000 using the BSB-LAN webserver I get the following possible states:

---
Mode protection
Automatique
Réduit
Confort

Any idea about my problem ? Many thanks for your help.

OK. I found the problem. Two issues:
1/ Wrong indentation of -name: "Mode opératoire" below the climate: entry :grimacing:
2/ state_topic and command_topic need to be replaced by mode_state_topic and mode_command_topic.
Everything is working ok now :slight_smile: