I have several template sensor with this configuration
template:
- sensor:
- name: "Laptop"
unique_id: "laptop_daily_energy"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
state: '{{ states("sensor.laptop_total_daily_energy") | float }}'
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
They are visible on energy dashboard and reset every day. But every new day they start with negative values. If I check the sensor itself it shows it goes every day at midnight to 0. But it get shown with negative value.
Any idea why this happens? Why are they not starting also on the dashboard with 0?