Chapter 6

Fixing the Truma cards

The two heating cards Home Assistant creates on its own are unfortunately unusable — for two reasons that have nothing to do with your setup. This chapter builds working replacements. After that the hot water can be switched reliably.

10 minutes Last verified: 22.09.2026 DE EN

What is wrong

Open the Truma Wasser card. It most likely reads unavailable. Two unrelated things are to blame:

First: "nan" while the heating is off
As long as boiler or heater are off there is no target temperature. Your CampMatic sends nan for it — "not a number". Home Assistant cannot turn that into a temperature and marks the whole card unavailable. The log says:

Value error while updating state of climate…truma_wasser … with payload: b'nan': cannot convert float NaN to integer

Since the heating is off most of the time, the card is empty most of the time.
Second: a temperature that does not exist
The card offers 40, 60 and 80 °C. For hot water your Truma only knows off, 40 °C and 60 °C. Pick 80 and you will wait forever.

Both can be solved cleanly in Home Assistant. We create our own sensors that cope with nan, and on top of them a selector offering exactly the three states that really exist.

Only 40 and 60 degrees — even though the card offers 80
The automatically created card allows 80 °C. On a VW Grand California you should not set that: the control panel in the vehicle only offers up to 60 °C itself, and the hot water plumbing is not rated for more. That is why the selector we are about to build knows only off, 40 and 60 °C.

The packages folder

Every sensor from here on goes into a single file. To keep it out of the way of whatever else you have configured, we use the packages mechanism.

Enable packages

Add this at the very end of /config/configuration.yaml:

/config/configuration.yaml yaml
homeassistant:
  packages: !include_dir_named packages
Already have a homeassistant: block?
Then only add the line packages: !include_dir_named packages underneath it, indented like the other entries. A second homeassistant: block causes an error.

Create the folder

Create the folder /config/packages — in the File editor via New folder, or in the terminal:

In the Terminal add-on bash
mkdir -p /config/packages

Installing the replacement

Create the file /config/packages/campmatic.yaml. The excerpt below holds the three replacement sensors and the hot water selector. Replace <GERAETE_ID> with your device number.

/config/packages/campmatic.yaml yaml Download
mqtt:
  sensor:
    - name: "Hot Water Setpoint"
      unique_id: campmatic_<GERAETE_ID>_ww_soll
      state_topic: "campmatic/<GERAETE_ID>/climate/truma_wasser/target_temperature/state"
      value_template: "{{ none if value | lower in ['nan','inf','-inf',''] else value }}"
      unit_of_measurement: "°C"
      device_class: temperature
      expire_after: 2700
      availability_topic: "campmatic/<GERAETE_ID>/status"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Heating Setpoint"
      unique_id: campmatic_<GERAETE_ID>_heiz_soll
      state_topic: "campmatic/<GERAETE_ID>/climate/truma_heizung/target_temperature/state"
      value_template: "{{ none if value | lower in ['nan','inf','-inf',''] else value }}"
      unit_of_measurement: "°C"
      device_class: temperature
      expire_after: 2700
      availability_topic: "campmatic/<GERAETE_ID>/status"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Hot Water Mode"
      unique_id: campmatic_<GERAETE_ID>_ww_mode
      state_topic: "campmatic/<GERAETE_ID>/climate/truma_wasser/mode/state"
      entity_category: diagnostic
      expire_after: 2700
      availability_topic: "campmatic/<GERAETE_ID>/status"
      payload_available: "online"
      payload_not_available: "offline"

template:
  - select:
      - name: "Hot Water"
        unique_id: campmatic_<GERAETE_ID>_warmwasser
        icon: mdi:water-thermometer
        state: >-
          {% set mode = states('sensor.hot_water_mode') %}
          {% set soll = states('sensor.hot_water_setpoint') | float(0) %}
          {% if mode == 'heat' and soll >= 50 %}60 °C
          {% elif mode == 'heat' %}40 °C
          {% else %}Off{% endif %}
        options: "{{ ['Off', '40 °C', '60 °C'] }}"
        select_option:
          - choose:
              - conditions: "{{ option == 'Off' }}"
                sequence:
                  - action: mqtt.publish
                    data:
                      topic: "campmatic/<GERAETE_ID>/climate/truma_wasser/mode/command"
                      payload: "off"
            default:
              # A single command. The setpoint switches the boiler on by itself.
              - action: mqtt.publish
                data:
                  topic: "campmatic/<GERAETE_ID>/climate/truma_wasser/target_temperature/command"
                  payload: "{{ 60 if option == '60 °C' else 40 }}"
Only ever one command at a time
The setpoint alone is enough to switch on — the boiler comes on by itself. Do not send a separate command for the operating mode afterwards.

Here is why: your box collects commands and hands them to the Truma in one go, as soon as the control panel asks for them. That takes a moment. A second command arriving in the meantime overwrites the first — and a switch-on command resets the setpoint to 40 °C in the process. You pick 60 °C and end up with 40 °C.

The same rule applies to the heating in the next chapter: one command, then wait until the state changes before sending the next.
Only one mqtt: and one template: per file
This is the most important rule for this file — and the hardest mistake to track down. If mqtt: appears more than once, only the last block counts. Every sensor listed before it disappears silently and reads unavailable from then on — without the configuration check saying anything.

The next chapters add more sensors. Always append them as list entries under the existing mqtt: sensor:, never with a fresh mqtt: in front.

Then: Developer tools → Check configuration, and once that comes back clean, restart Home Assistant.

Reloading is not enough here
New MQTT sensors only appear after a genuine restart. Reload the configuration instead and you will see them in the list but permanently unavailable — and go looking for the fault in the wrong place.
Before you move on
  • The packages entry is in configuration.yaml
  • The file /config/packages/campmatic.yaml exists
  • The configuration check reports no error
  • After the restart the entity select.hot_water exists and reads Off