Energy calculation warnings

Hi all,

In my logbook, I got different warnings with everytime the same message, that a float got invalid input:

Template warning: 'float' got invalid input 'unknown' when rendering template '{{ (states('sensor.energy_import_t2_daily')|float * states('input_number.t2_energy_cost')|float)|round(2) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'float' got invalid input 'unknown' when rendering template '{% set a = states('sensor.energy_import_t2_monthly') | float %} {% set b = states('sensor.energy_energy_import_t1_monthly') | float %} {% set c = states('input_number.all_in_dubbeltarief_stroom_hoog') | float %} {% set d = states('input_number.all_in_dubbeltarief_stroom_laag') | float %} {% set e = states('input_number.netbeheerkosten_stroom') | float / 365 %} {% set f = states('input_number.vaste_leveringskosten_stroom') | float %} {% set g = states('input_number.vermindering_energiebelasting_stroom') | float / 365 %} {{ (((((a * c) + (b * d)) + ((e * 365) / 12)) + ((f * 365) / 12)) + ((g * 365) / 12)) | round(2) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'float' got invalid input 'unknown' when rendering template '{{ (states('sensor.cv_energy_daily')|float * states('input_number.t2_energy_cost')|float)|round(2) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'float' got invalid input 'unknown' when rendering template '{{ (state_attr('sensor.cv_energy_daily', 'last_period')|float * states('input_number.t2_energy_cost')|float)|round(2) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1

Anyone knows what’s happening ?

Kr,

Bart

1 Like