How should I configure the Integration sensor to calculate the power consumption of the floor heating.
I have the template sensor defined which is providing the power of the floor heating.
- sensor:
- name: "kh_therm_power"
unit_of_measurement: "W"
device_class: "power"
state: >-
{%- set power=0.0 %}
{%- if state_attr('climate.kh_therm', 'hvac_action') == 'heating' -%}
{%- set power=747.2 %}
{%- endif -%}
{{ power }}
And the integration sensor as follows:
- platform: integration
source: sensor.kh_therm_power
name: kh_therm_energy_spent
method: left
unit_prefix: k
round: 3
The intgration sensor works but the calculation is way off…
November 10th night the 747W power was on for 4 hours result should have been 2,988 kWh. But incorrectly it was 3,77 kWh.
For the November 9th the trapezoidal method was used, but results were even more weird and after 6pm the kWh reading jumps up when the heating is turned on. Note: after 9pm the energy value was reset to zero manually and method changed to the ‘left’
Is there bug in the Integration code or is here some sort of wierd configuration error?