Its the beginning of a new month so my Monthly Stats sorted itself.
Still not able to reset the yearly stats. I tried zero-ing the utility sensor value in core.restore_state and also calling the utility sensor reset service but but they are still showing the old values.Will probably wait longer and see if it resets it.
More than happy to run with the current settings to provide feedback. What are the sensors that you would like me to monitor?
I have also had a hard time “fixing” utility sensors. My monthly sensors got screwed up last month and I could not fix it. But it corrected itself this month.
Did you try resetting by adding a “dummy” tariff to your utility sensors?
I am currently testing some changes in sensor.py to see if it looks better. I think I also found two bugs in the code. So I will push my changes to my fork in a day or two and then maybe you can try that and if it works for you too I can prepare a pull-request for it.
There are some tricky parts to this API though. Fronius handles the API endpoints differently when the inverter is not working. In some endpoint(s) the key(s) are always present but their values may be 0 or null. And in other endpoint(s) they never include the key(s) at all if the inverter is off.
You could play with the Mini Graph Card for Lovelace.
That card allows you to create graphs like this if you just want to see some visual history over multiple days:
I used it for a while but it had some limitations that I did not like. So for now I am creating some graphs with Grafana that I am pulling into Lovelace since I am anyway storing all the data in Influxdb. It allows for greater flexibility and you can easily create single graphs with multiple entities that “overlaps” (e.g. one bar that can show all the four energy sensors I have today below the graphs).
You can also see 3 Influxdb sensors in my package that I am using for pulling in “peak” power consumption per day/7-days/total. That could also be an option.
That said, I am nowhere near satisfied with what I am displaying today. But I am slowly improving it. So if you have ideas/solutions to what can be done i’m interested
Tried that and didn’t work. I ended up new sensors for the yearly readings. (Appending _2 to all the yearly sensors) a cheat quick fix.
### yearly data ###
# calculate yearly energy used
house_energy_year_2:
source: sensor.energy_used_hour
cycle: yearly
# calculate yearly energy consumed from grid
grid_consumed_energy_year_2:
source: sensor.fronius_smartmeter_energy_ac_consumed
cycle: yearly
# calculate yearly energy sold to grid
grid_sold_energy_year_2:
source: sensor.fronius_smartmeter_energy_ac_sold
cycle: yearly
I had some fun playing with automation and notifications today. I realized that I was closing in on our first MWh sold and I thought it would be nice to have a notification for every MWh that is sold and one for every MWh that is produced by the panels.
I finally managed to get my dummy sensor working for storing my end of day readings. It will kick in at 11:59:40 everyday under automation and act as ‘yesterday’s stats’ for comparisons.
If I could only find a lovelace card that allows you to create bar graphs where the bars are “overlayed” for each day then I could ditch the influxdb/grafana setup. I am using the mini-graph-card but that one can only do “stacked”, which is not the same as “overlayed”, and side-by-side.
The biggest problem with lovelace is finding all the nice cards that are really useful and also kept up-to-date.
I’ve create input_number to store the reading from today (from automation) then template sensor to read the input_number and used as yesterday’s reading.
I think i need to use integration sensor but i’m not too sure how to write it.
input_number:
yesterday_energy_produced:
name: Total Energy Produced Yesterday
unit_of_measurement: "KWh"
min: 0
max: 9999
initial: 0
icon: mdi:solar-power
I have documented my setup and the cards I have used. I redid all the rest sensors and used the Fronius component. I also used most of the things you have done @nilrog. I put it all here below so maybe this could help someone. I can be hard to read all this thread to get started. I would really like to use the dual gauge card as well as some other cards but they does not work in the latest HA version. Looking forward to see more nice ideas here. And thaks for everyone who gave me inspiration.
I am still not done with the dashboard but have most of the things to get started now.