Thank you for your work, markpurcell,
but I don’t understand your Configuration.
I mean, I get the idea, but I am wondering what value is in the sensor apf_solar2house: Current Watt, kWh in total? Why does it get divided by 1000?
And I was wondering, how is your Solar Benefit Integral configured (settings)?
Ah okay, that makes sense. Thank you for the explanation .
So, for the Riemann-Summenintegral, it would be Left Riemann sum, no Metric Prefix and Time h (hours)?
Hi @markpurcell , thanks for the excellent guide!
I was able to follow it and create the sensors & helpers, but struggle with the Apex Chart.
I don’t suppose you’d be willing to share the code for that?
However, i live in Denmark, where the cost of electricty changes for every hour. How would this be done with that?
I have a two sensors, one that always is the current cost, and one that is the current sales price of electricty.
No sorry.
I’m very new to templates, which i’m guessing it is, your solution?
I have these sensors available
sensor.power_meter_consumption
sensor.inverter.daily_yield
sensor.power_meter_exported
sensor.energi_data_service - which is the current price of eletricity, updated every hour.
sensor.nettopower_salg - which is the current SALES price of eletricity, updated every hour.
Can your solution work with these sensors? @markpurcell
But this is just a running sensor, it doesn’t calculate my total savings, just what i’m saving right now, this second.
EDIT2:
Think i got it, i didn’t know that rieman and utilty meter was helpers xD Never used them
If it doesn’t work, ill get back to you, thanks for the help!
I haven’t done anything about the 7000 kr tax rule, since i really don’t expect me to have that amount of payback for my exported power.
My Nettopower_salg sensor is a template i created, using the nordpool integration to calculate the price.
This shows the current sales price to Nettopower, and also the sales price for the next 48 hours, as long as the nordpool sensor also has the next 48 hours (which it usually has)
- platform: template
sensors:
nettopower_salg:
value_template: '{{ (states("sensor.nordpool_kwh_dk2_dkk_5_10_0")|float - 0.00375 - 0.000875 - 0.04)|round(3, floor) }}'
friendly_name: "Nettopower salgspris"
unit_of_measurement: "DKK/kWh"
unique_id: nettopower_salg
attribute_templates:
today: >
{% if state_attr('sensor.nordpool_kwh_dk2_dkk_5_10_0', 'today') %}
{% set ns = namespace(prices=[]) %}
{% for h in range(24) %}
{% set ns.prices = ns.prices + [(float(state_attr('sensor.nordpool_kwh_dk2_dkk_5_10_0', 'today')[h]) - 0.00375 - 0.000875 - 0.04) | round(3, floor)] %}
{% endfor %}
{{ ns.prices }}
{% endif %}
tomorrow: >
{% if state_attr('sensor.nordpool_kwh_dk2_dkk_5_10_0', 'tomorrow') %}
{% set ns = namespace(prices=[]) %}
{% for h in range(24) %}
{% set ns.prices = ns.prices + [(float(state_attr('sensor.nordpool_kwh_dk2_dkk_5_10_0', 'tomorrow')[h]) - 0.00375 - 0.000875 - 0.04) | round(3, floor)] %}
{% endfor %}
{{ ns.prices }}
{% endif %}