In my last post “Taking Back Control” I wrote about how I’m using Home Assistant to control my SolarEdge battery due to their software being a bit naff. That was back when I was on the Octopus Go tariff, during the summer I switched over to the Octopus Flux tariff and did a bunch more Home Assistant stuff to work with that tariff; different rates, different times and an evening period where it’s financially beneficial to be exporting. I’ve now switched away from Octopus Flux and on to Intelligent Octopus Go as they now support my Zappi EV charger. I’ll try and write up the Flux stuff at some point.
What is Intelligent Octopus Go?
Intelligent Octopus Go is a 2 rate electricity tariff offered by Octopus that gives you electricity for 7.5p/kWh between 23:30 and 05:30 and at the other times electricity costs more, for me it is 29.78p/kWh.
How Does It Interact With The Battery
If I simply changed the charging schedule of the battery to 23:30-05:30 then that would mean the battery played pretty nicely with the new tariff and I could reuse almost all my existing automations.
However, if/when Octopus decide to charge the EV outside of those times, my battery would see that as load that it should attempt to cover and would begin discharging at its maximum rate of 5kW, within 2hrs it would be totally empty, meaning I could end up importing from the grid at my higher unit rate if the EV stops charging before 23:30. This is not ideal.
The Solution
My solution is simple: If Octopus is charging the EV then the SolarEdge battery should be charging too.
The first step of achieving that is not strictly necessary but as I’d now copy and pasted the battery control actions from my Go tariff automations into my Flux tariff automations and will now need them again in the Intelligent tariff automations, I decided to create a script to control the battery so that the automation code is a bit simpler.
The Script
The script takes a mode parameter that is either Import, Export or Self Consume and makes the necessary calls to put the battery into that mode. As usual, the yaml can be found on my github
The Octopus Integration
The automation requires Megakid’s Octopus Intelligent integration in order to determine when Octopus is charging the EV, this is the “Octopus Intelligent Slot” sensor, which turns on/off.
The Automation
Triggers
The automation triggers whenever the Octopus Intelligent Slot sensor changes state
Conditions
None
Actions
I have setup a choose action with 3 choices depending on the state of the Octopus Intelligent Slot sensor; on, off and unavailable.
On: When the Slot is on, call the set battery mode script with the parameter Import
Off: When the Slot is off, call the set battery mode script with the parameter Self Consume
Unavailable: I had one day where the integration stopped working so, if that happens, if the time is between 23:30-0530 then set the battery to Import else set it to Self Consume. This is far from perfect and needs more work.
Automation yaml available on github
And that is it, pretty simple