Octopus Agile
Octopus Agile is an Octopus tariff which allows you to plan your usage for your current day, the pricings are following wholesale prices so you can take advantage of the fluctuations during the day and night while prices drop.
Configuration
prices_to_includeis the number of the cheapest half hourly periods that you want to include- this can be a function (as defined in custom prices to include)
- or simply just an integer value between
0and46( a full day 0:00-23:00)
action_when_cheapis your function that is called when the half hourly period is among the cheapestaction_when_expensiveis your function that is called when the half hourly period is more expensive than the cheapestpricing_strategyis a custom class you can pass in to act on prices in a more complex way (this is covered in custom pricing strategies)api_keya secret key that gives the script access to fetch your most recent tariff (do not push this to git or share with anyone)account_numberyour account number for a supported supplier and tariff
How do I get my account number & API key?
Go to octopus.energy and sign in, then follow these steps after clicking the menu button on the home page.
A best practice is to place these in a .env file, and bring them in with python-dotenv, be sure to put .env in a .gitignore file.
How often are my actions called
The actions happen every 30 minutes, if the price is cheap then action_when_cheap is called, if it is expensive then action_when_expensive is called.
There is a 10 minute grace period on an action missing your current time from when you begin the schedule initially.