EnergyScore

I have for a while been interested in tracking how well (or really not very well) I am able to exploit varying electricity prices throughout a day, ie. charging my EV or heating water in the cheaper hours. I think such a measure is a prerequisite to optimising energy usage, to track what is worthwhile.

Combining this need with the urge to create something for Home Assistant I have put together a custom integration to do just this. EnergyScore is not an integration for optimising the energy use for your devices, but purely a measurement to see how well you are able to optimise. This will be handy both on shorter and longer term depending on your goals.

energyScore_gauge

I have plans on continuing to develop this integration, but it is now stable enough to be shared and to get feedback on how it creates value for you, or what you wished it could do. You can find the integration on HACS or on GitHub.

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

1 Like

This is very cool!

1 Like

This is a great plugin which I started to use a couple of days ago.
I would like to see the score (last measurement) for each day in a graph to compare the days and the trend. Should I use utility meter for that or what i s the best way?

Keep up the great work
Cheers

hmm good question. I’ll play around a bit with the utility meter and check it out.

1 Like

I have some problems understanding the score. If I look at the score for some days ago it doesn’t look that the score increase when I use electricity in the last hour which is the cheapest. Well, it increased but at 23.00 when the price was at it’s cheapest the score dropped. Could you care to explain the score a bit to make me understand :slight_smile:

It seems like your energyscore makes sense, I’ll try to explain what’s happening here. Every hour of the day, when the price state is updated, the prices are normalised between 0 (most expensive) and 1 (cheapest) for the hours passed. Your energy usage is also normalised, but all the hours sum up to one. So an example: at the hour from 05-06 you have the most expensive price so far that day, but not that much energy usage so energyscore is quite stable. But suddenly the price increases a lot at 06 and then the prices earlier that day are much cheaper in comparison, so you have used most of your energy so far in the cheaper hours of the day and thus the energy score goes up! Since you continue to use some energy throughout the day, it keeps dropping since it is used in the more expensive hours of the day.

Then comes the last hour of the day, suddenly the cheapest hour of the day arrives. This means that all your energy usage throughout the day earlier has been less optimal given that it could have been used even more this hour, hence your energyscore drops.

If you live in an area where the price is controlled by Nordpool, you could (should) use the nordpool custom component which gives you a sensor where the prices for the whole day is available. These prices are now used to calculate the energyscore based on the full information, thus increasing the accuracy alot for the energyscore (less fluctuation throughout the day).

I hope this helps explaining the sensor!

Ok, makes sense. I use the nordpool plugin but I guess I should set up the score integration differently. I will look into that.
Thanks for your help

Hi again
I set it up like below and that should be the proper way for the nordpool integration, shouldn’t it?

- platform: energyscore
  name: Energy Score
  unique_id: AC816DB0-868A-431C-92AE-CBD46A434DC5
  price_entity: sensor.nordpool_kwh_se3_sek_2_10_025
  energy_entity: sensor.active_energy_import_q1_q4

When I check the attributes of the score sensor it still only lists the hours passed.

Am I missing something again? :sweat_smile:

Can you please post a picture of energyscore sensor attributes and nordpool sensor attributes?

Sure thing



I have added a markdown file in the repository with a couple of visualisations for EnergyScore. This is also a way for you to contribute with sharing your visualisations. Example with instructions:

1 Like

You need to be on version 0.3.0 or above for nordpool to give you more accuracy on energyscore. From your attributes it seems like you are not, please check HACS for update and reboot HA afterwards.

1 Like

Major refactoring in the latest release. EnergyScores are from v0.4.0 rolling over the last x hours (with x=24 currently) instead of day-by-day.

1 Like

Version 1.0.0 is here! Config Entry (user interface setup) is now supported!

1 Like

Hi
May I suggest just a small improvement in the apex-chart?
Perhaps since you are not using the historic value there is no need to create a template with a state to visualize?

So my suggestion is:

  1. skip the sensor
  2. change the apex-series to get the attribute and transform directly in the apex-series:
      - entity: sensor.pwrctrl_energyscore_total
        attribute: quality
        transform: "return x * 100;"

which for me gives this graph:
image

and thanks for the great contribution :wink:

Hi
Totally agree, a graph/bar view of past days/months for each sensor would be lovely.
And what is actually the day’s score? is it the score for the last hour of the day that is the total score for the day?? - not sure I fully understand the logic - but seems intreaguing in the world of #becausewecan :wink:

For shure I’ll be watching for future updates and perhaps read a bit better the actual documentation :sunglasses:

Brilliant! I have updated the example with this improved version!

My intention with the EnergyScore is mainly to verify optimisation efforts to see what is working and what is not. Due to using a lot of time on developing the integration I have not explored too much on how to visualise this in a good way yet.

I did start some testing yesterday though, when I set up a new automation that blocks the immersion heater in my boiler in the most expensive hours of a given day. I think that trending the average energyscore before and after such an implementation will provide me with answer if its working as intended (and thus saving me money). Yesterday I got the highest average energyscore for the week at 83%.

I still need to experiment with this more, maybe minimum of the day is better than average? Another thing that is not captured in the EnergyScore now is that if an automation delays (or accelerates) energy usage and it results in cumulative more energy used it is not necessarily good… Still think it’s good to have a score to verify effect of optimisation!

Hi, I tested as well with a statistic graph and it turned out pretty ok. Averege, min and max per day over 30 days…

Awesome, did you do something to optimise your energy usage during the last 14 days period or is the increased score just statistical coincidence?