adds template sources
This commit is contained in:
11
helpers/sensor.estimated_charge_percent_tomorrow.jinja
Normal file
11
helpers/sensor.estimated_charge_percent_tomorrow.jinja
Normal file
@@ -0,0 +1,11 @@
|
||||
{% set totalWh = 3200 %}
|
||||
|
||||
{% set estimatedChargePercentToday = states("sensor.estimated_charge_percent_today") | float(0) %}
|
||||
|
||||
{% set avgConsumptionWh = states("sensor.energy_from_battery_7_days_average") | float(0) %}
|
||||
{% set avgConsumptionPercent = 100 * (avgConsumptionWh / totalWh) %}
|
||||
|
||||
{% set tomorrowProductionWh = (states('sensor.balkon_solcast_pv_forecast_balkonsolar_forecast_tomorrow') | float(0)) * 1000 %}
|
||||
{% set estimatedProductionPercentTomorrow = 100 * (tomorrowProductionWh / totalWh) %}
|
||||
|
||||
{{ (estimatedChargePercentToday - avgConsumptionPercent + estimatedProductionPercentTomorrow) | round(2) }}
|
||||
Reference in New Issue
Block a user