Automated with HomeAssistant-OctopusEnergy from BottlecapDave #364
CraigCallender
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Also posted here, but I was able to set up some automation using the HomeAssistant-OctopusEnergy integration to pick the cheapest Agile slots (non-contiguous) to charge my batteries at night. Thought I'd share:
So I borrored a good bit from #284, but the Solis Inverter has three timeslots that can be configured to force charging from the grid. I followed the tutorial here to setup the Target Rate setting in the Octopus integration.
Originally, I configured the automation to look at the binary_sensor for when my
binary_sensor.octopus_energy_target_battery_charge_slots
changed state toon
, I would just start charging and the start and end times were set to thesensor.octopus_energy_electricity_18l2077993_1900013281497_current_rate
start
andend
attributes. I didn't have to worry about the off state since I'm setting the end time. And I was assuming theon
state would come on at the same time as thecurrent_rate.start
.This worked well, but I had one more issue... I don't run HomeAssistant 24/7. I will, but I don't now. Also, Solis Cloud will often go down, so I wanted the ability to set all three times as soon as they're calculated in case something happens where I can't set it in real time.
In the end, I ended up with this. You'll probably need to use the YAML editor as I had issues with the
true/false
states being interpretted as strings when using the UI mode to setup the trigger and condition. You can always use the UI mode then just get rid of the""
aroundtrue
andfalse
if that's easier.Trigger - Look for the
target_times_last_evaluated
to change (this seems to only change when new prices come out).The two triggers are important to me because I also hijack the first charge time slot if electricity rates every go under 0.02 GBP / kWh. So in case that happened, I just reset the values whenever the state of the binary_sensor turns on.
I've added a condition as we can't run this if
rates_incomplete
is set totrue
:Action - Use the SolisCloud integration to set the inverter's three charge slots. You can only do this with a service, so it's a bit verbose. Also, the mixed strings in the
config
for the service are like that for some reason.Hopefully that helps the next person out trying to get this configured with the Octopus integration.
Beta Was this translation helpful? Give feedback.
All reactions