Hi all, im hoping someone can help.
I’m hoping to create a template sensor that gives me the total amount of Solar i have sold back to the grid from when my Inverter becomes available after sunrise until it becomes unavailable after sunset. I know HA has this as a Graph called Net returned to the grid.
SO far i have this, but i need it to be calculated daily. Is there a way to do this all in the same template??
#### Net Solar Sold To grid
- name: "Net Solar Sold To Grid"
icon: mdi:transmission-tower-export
unit_of_measurement: "kWh"
state: "{{ states('sensor.fronius_real_energy_consumed')|float / 1000 | round(2) - states('sensor.fronius_real_energy_produced')|float / 1000 | round(2) }}"
device_class: energy
state_class: total_increasing
availability: "{{ states('sensor.fronius_real_energy_consumed')|is_number and states('sensor.fronius_real_energy_produced')|is_number }}"