Hi, is it possible to report the daily energy cost value from the PVOutput integration?
See pic below for the field.
I would love this too, have been trying to find a solution but no luck yet. Ill follow this thread.
Super late but here’s what I use:
sensor:
- platform: template
net_export:
value_template: '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "$ %0.2f"|format((states.sensor.pvoutput.attributes.energy_generation|float/1000) *0.47135) }}{% endif %}'
icon_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
mdi:currency-usd
{% else %}
mdi:currency-usd-off
{% endif %}
friendly_name: 'Net Export Credit'
automation:
- alias: 'Solar Energy Generated Today'
trigger:
- platform: sun
event: sunset
offset: "+00:15:00"
action:
- service: notify.ios_all
data:
message: 'Total solar energy generated today is {{ states.sensor.energy_generation.state }} kWh resulting in a Net Export Credit of {{ states.sensor.net_export.state }}.'
title: Solar Energy Today
Change your feed-in rate (mine is 0.47135) to suit.