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.
What is wrong
Open the Truma Wasser card. It most likely reads unavailable. Two unrelated things are to blame:
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 integerSince the heating is off most of the time, the card is empty most of the time.
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.
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:
homeassistant:
packages: !include_dir_named packages
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:
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.
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 }}"
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.
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.
- The
packagesentry is inconfiguration.yaml - The file
/config/packages/campmatic.yamlexists - The configuration check reports no error
- After the restart the entity
select.hot_waterexists and reads Off