Can someone help me with this:
value_template: "{{ (states('sensor.monthly_energy_peak')|float * 0.31) | round(2) + (states('sensor.monthly_energy_offpeak')|float * 0.23) | round(2) }}"
and this is the result:
Can someone help me with this:
value_template: "{{ (states('sensor.monthly_energy_peak')|float * 0.31) | round(2) + (states('sensor.monthly_energy_offpeak')|float * 0.23) | round(2) }}"
and this is the result:
round after the calculation, not during.
value_template: "{{ (states('sensor.monthly_energy_peak') | float * 0.31 + states('sensor.monthly_energy_offpeak') | float * 0.23) | round(2) }}"
Thanks Petro!