Stop wasting your time with weird values. 16 is fine.
Do you have a working Agile sensor yet? If you don’t see a value for the sensor that corresponds to the current Agile rate, there is no point fiddling with the automation. Show me a screenshot of that sensor — sensor.octopus_energy_cost_tracker_agile.
That’s not from the rest sensor you set up. I assume from that and your other screenshot that you have an Octopus integration installed.
The state of that sensor is not your current Agile rate — its the cost you’ve incurred over some amount of time. You don’t want to be triggering the automation from that.
Have a look at the Integration screen and see if there’s a sensor provided that gives the current rate.
The first one is close although that’s the next rate. You need to find the current rate. These are in £/kWh so you will want the decimal threshold e.g. 0.16 when you find the right one.
The second screenshot is the same cost sensor we were taking about earlier.
Please read what I wrote more carefully. I understand that there’s lots of information here that can be confusing for a beginner, but you need to get into the detail. You’ve used 20 and 25 yet we’ve established that the rate sensor from the Octopus integration is in £/kWh not p/kWh, so you want 0.2 and 0.25.
As you already have the integration, you don’t need the rest sensor or update automation.
Adjust your Turn On / Turn Off automations to use a threshold value in £, so 0.2 or 0.25.
Note that neither automation will do anything until a threshold is crossed. Please only report back once all the above changes have been made, and the current rate has either gone from below £0.25/kWh to above (“turn off” trigger) or from above £0.20/kWh to below (“turn on” trigger). If it’s not behaving as you expect, please clearly state what is and isn’t happening, not just “doesn’t work”.
Thanks for your patience,
I’ve done all of the above and checked the rates and restarted HA, this is my code now.
In Automations (for on) it says "When Electricity xxxxxxxxx xxxxxxxxxxxxx Current Rate is below 0.18
In Automations (for off) it says "When Electricity xxxxxxxxx xxxxxxxxxxxxx Current Rate is above 0.25
Show me a history graph of the sensor (the one with all the xxxxs in) including the time where you think it crosses the threshold. Like this, but for your sensor:
Then go to your Automations screen. If the Last Triggered column shows the expected time for the threshold crossing, click the three dots and select Traces. That should give a screen that looks like this:
This is all the information I can find, I cannot see anything that allows me to select Traces. I cannot see anywhere that shows me a Triggered column either.
I appreciate your ongoing help, if you can help me get it working I am also wanting to understand how it works and whats gone wrong so I can learn from it.
My knowledge is basic and I have been over and over it trying different things, but I am obviously missing something.
Your graph clearly shows the rate sitting below £0.18/kWh for the entire time. The trigger will only fire WHEN THE THRESHOLD IS CROSSED.
At 16:00 today your rate will jump above £0.25/kWh and the “turn off” automation should trigger. Then at 19:00 or 19:30 (not clear from the graph) it should drop below £0.20/kWh and the “turn on” automation should trigger.
These are your rates (assuming you had the correct URL in your original Rest sensor):
The blue and pink lines are the two thresholds in your automations. The red and green circles show where each automation will trigger.
That’s because you weren’t on the Automations screen. Click Settings (bottom-left, and you might want to see what those notifications are about), then click Automations and Scenes.
Hello, I just wanted to say that it worked, turning on and off, thank you for your patience and your help, I understand now about the threshold values and have set it accordingly. Thanks again