Hello fellow energeeks, new one here (M.Sc EE). I and maybe someone else is interested about the financial gains of our solar systems. Right now we are able to monitor the energy cost from the grid import and export with hourly tariffs, we already have the hourly consumed solar energy based on production minus export, so how about monitoring the financial gain of the self consumed solar as well?
#Price for consumed solar energy?
1 messages · Page 1 of 1 (latest)
I used several hacs components to create this dashboard. It allows me to keep track of both usage & production plus costs & savings over any period I'm interested in. If you're interested I can you give you some more details.
Definitely! Tips&tricks would be awesome and appreciated.
First, to show any LTS (Long Term Statistic, a.k.a. energy statistics or statistics) I used the "Energy Entity row" HACS component by zeronounours. This can be used like any entity row in your dashboards. The Energy Entity Row requires the energy date picker (in the top of the screen) to select a period over which to show the data. This energy date picker can either be the default date picker from the energy cards [https://www.home-assistant.io/dashboards/energy/] or another HACS component "Energy Period Selector Plus" by flixlix. Neither are flawless, but generally the latter works best.
To start experimenting with setting up your dashboard I suggest you try showing the default energy dashboard's LTS first. It keeps track of the costs by keeping entities named after the entities you specified for a.o. grid consumption, grid production and solar production, then adds _costs or _compensation to that sensor's name. f.e. One of the energy sensors I specified in the dashboard is called "sensor.electricity_meter_energy_consumption_tarif_2", so the energy dashboard created an additional sensor named "sensor.electricity_meter_energy_consumption_tarif_2_cost" that holds the cumulative costs for that 1st sensor. You can show these in the entity row and they will show the energy consumed or the cost incurred for that usage over the selected period.
Next, to create my own LTS I use another HACS component by zeronounours: "Energy meter". This was originally created as a replacement for the "utility meter" which not only creates a sensor alike that of the utility meter, but also a cost sensor keepinmg track of the cost of this utility meter. Zeronounours was friendly enough to add -upon my request- the option to use the energy meter component to only create the cost sensor from any existing LTS sensor, which makes the component so much more useful, albeit that you need a somewhat complex configuration (available through yaml only). As an example here's how I defined 2 of my cost sensors:
energy_meter:
electricity_total_used:
source: sensor.energy_used
create_utility_meter: false
name: "Total electricity used"
unique_id: electricity_total_used
price_entity: sensor.electricity_meter_energy_consumption_price
electricity_solar_used:
source: sensor.energy_self_consumed
create_utility_meter: false
name: "Self-produced electricity used"
unique_id: electricity_solar_used
price_entity: sensor.electricity_meter_energy_consumption_price
These track the cost for the both top rows in my dashboard.
One other thing I did to keep things better organized for myself is to create a package that defines all main power, energy and price entities and as such hides which particular sensors are used for each from both my dashboards plus the cost definitions: LTS tend to get lost rather easily when you make any changes to a source sensor. Again, as an example here's the package I created. If you want to re-use it, you'll have to put in your system's sensor names of course.
If you haven't done so already, to enable using package files create a folder named "packages" in your /config folder and add
homeassistant:
packages: !include_dir_named packages
into your configuration.yaml.
If you look at f.e. the sensor named "electricity_meter_energy_consumption_price" you'll see that I changed from an energy provider that I used to manually enter prices periodically for, to one that provides me their (hourly) prices through an integration (Tibber). All I had to do when I switched from one provider to the other is to change the template for this sensor and automatically all prices were taken from the integration instead of from the input fields. I left the original code as comments below the sensor, to serve as an example.
Thank you so much! I’ll get into it.