Hello fellow mates,
I am learning HA and found the following problem.
I have entity as seen in blow picture, that has some history data (top half of picture)
The thing is this data is in Wh, and I need it in kWh.
I have learned I need to create new entity configuration in configuration.yaml using template engine.
So I have created this:
sensor:
- platform: template
sensors:
qm_tpl_pvproduction:
friendly_name: "PV production (kWh)"
unit_of_measurement: "kWh"
value_template: "{{ states('sensor.fotowoltaika_production_power') | multiply(0.001) | int }}"
device_class: energy
But then, when I check the history panel, I get this (bottom half of picture)
Developer tools panel, does not see any problem with my template.
I am missing something, but I don’t know what.
Cheers,
B.