Optimising energy consuption at the right time

This might be in the wrong place since it’s not a specific request for an exact feature.

We have great capabilities today in HA to monitor energy, and also more simple automation to control devices based on situations and values.

However, looking at the future how the energy market is changing from static prices and tariffs to more flexible prices.
This includes the “day ahead” market, load tariffs, and other things. It would be good to have some more standard way in HA to control when a device should be running rather than just build on the current situation.

This is most likely already possible to do for someone that is way smarter than me when it comes to coding and logic capabilities.

I will take my situation as an example to get some more practical scenario:

I live in a house in Sweden. At the house, we Produce energy via PV system. There is an Electric car that is charged via the house. Right now I don’t have a battery for storing energy but this could be the case for someone else.

My Energy price is set based on hourly to hourly prices from the Nordic Nordpool spot market. This includes both the energy I sell back to the grid (excess that I don’t use) and the energy I buy from the grid when I don’t produce.

As an example, I would like the car to be charged when it’s as beneficial for me (and EU energy grid) as possible. Of course, this the only energy output that it could be used for. However, it’s far the easiest to exemplify.

1 I have the prices per hour for the current day and for the upcoming day (released around 13:00) via custom component Nordpool spot.
2 measures real-time consumption on most inputs and outputs. I, therefore, know how much I produce, consume, sell, and buy.
3 and have integrations and switches to control the devices

In theory, I should be able to schedule the charger to the car to be on and charge the car during the lowest priced hours for the next day. On top of that add logic to charge car instead of selling energy back to the grid when overproducing.
I should be able to make calculations based on how much battery is left in the car to come to a conclusion on how long time it will take and schedule charging for the right amount of hours. Not just looking to the cheapest hour.

Similar variables and logic should be possible for use in energy storage situations or heavy consumables in houses that do not need to run at a specific time.

So why the hell do I post this in the Feature section?

Well, I think this kind of logic will be the future for anything working with energy. And HA has the base capability to control it for a lot of people. Problem is that trying to build automation with all of these values coming from all different integrations is bloody hard. At least for me.

Would be fantastic if predefined logic for the more complex parts could be done via built-in logic.
Like a function or meter that evaluated priority houres. A scheduling tool function that does not go on fixed values and instead follows rules and sorting.

This is not an exact feature request, more a request for a new area for HA. If people are interested

Best regards
Nicklas

I’m new here, and this is one of the main features I am looking for in home automation systems. It seems like an obvious way to save some money, and I’m surprised to see it isn’t an essential feature, or even discussed actively.
I can do a litte python coding, and might be willing to learn how to develop custom components just for this feature alone. I’m not sure about the terminology, but at first glance it seems that the way to go is create a sensor, or several, which returns on for n cheapest hours between start time and stop time. That sensor can then be used as input to control switches. What do you think?

2 Likes

Different needs require different modes. Time-window mode would seem to work for EV’s and water boilers, as charging/boiling at any time over the night suffices, and the energy wont diminosh before its used. Other needs would be better suited by a moving window, and others with some kind of a time-pressure model that takes usage into account. One step further would be a predictive model based on spot price and weather forecast. Heating is the obvious application for that.
I still find it hard to believe this problem remains untackled. I’m no programmer or engineer. Maybe its much more complicated than I think?

I found this thread in the search for a suitable function to charge the car when price is low. Regarding your last part I do have set up floor heating based on SMHI 3 day forecast. Not to save cost but to stabilize the indoor temperature. Next logic step would be to add cost saving as well.