Hi,
(first post, so please be patient)
I want to create a helper sensor which calculates the sum of 2 sensors.
In fact it does the calculation (the 7.1 in the error message below), but do not shows it due to an error for non-numeric and string.
Searched and tried several variants but ending always in the same issue of non-numeric values. Where is the error?
Here my template code (created in UI) and below the error.
- platform: template
sensor:
fritzbox_gb_total:
friendly_name: 'FRITZ!Box 7590 AX Hauptrouter GB insgesamt'
entity_id:
- sensor.fritz_box_7590_ax_gb_empfangen
- sensor.fritz_box_7590_ax_gb_gesendet
value_template: {{ states.sensor.fritz_box_7590_ax_gb_gesendet.state |float(0) + states.sensor.fritz_box_7590_ax_gb_empfangen.state |float(0) }}
Error:
Sensor None has device class ‘data_size’, state class ‘total_increasing’ unit ‘GB’ and suggested precision ‘None’ thus indicating it has a numeric value; however, it has the non-numeric value: ‘- platform: template sensor: fritzbox_gb_total: friendly_name: ‘FRITZ!Box 7590 AX Hauptrouter GB insgesamt’ entity_id: - sensor.fritz_box_7590_ax_gb_empfangen - sensor.fritz_box_7590_ax_gb_gesendet value_template: 7.1’ (<class ‘str’>)