Hi,
I am looking for a way to show sensor data from a date till now. Let me explain. First of all I life in the Netherlands, we have something called “Saldering” for our solar energie production. This is based on the Contract date and done at the end of the year.
A lot has been written about it and yes HA can’t predict anything. What i want to do is see where i am standing. Which is basically easy. Export - Import for both tariffs But here is the snag… My contract starts on 7 aug. And my values are based on the entire history. which is incorrect in a way.
So here is the main question:
How can i make the values show everything from 7 aug. till now. (So just Day/Month). So when 7 aug 2024 come, it starts at 0 again.
Do I need to set it in the sensor or in the frontend and how.
# Calculate Saldering
- platform: template
sensors:
saldering_hoog:
value_template: >
{{ '%0.1f' | format(states('sensor.p1_meter_5c2faf0b0b78_total_power_export_t2') | float -
states('sensor.p1_meter_5c2faf0b0b78_total_power_import_t2') | float) }}
unit_of_measurement: 'W'
friendly_name: Saldering Trarief Hoog
- platform: template
sensors:
saldering_laag:
value_template: >
{{ '%0.1f' | format(states('sensor.p1_meter_5c2faf0b0b78_total_power_export_t1') | float -
states('sensor.p1_meter_5c2faf0b0b78_total_power_import_t1') | float) }}
unit_of_measurement: 'W'
friendly_name: Saldering Trarief Laag
ThanX
Wijnand