Octopus Energy Agile Tariff

With a fresh head I had another look today and Yes like you mention they do get triggered based on GMT too so all works well…but it also means in the timer config you need to use GMT (this caught me out at first…once you know this it’s fine of course).

As for the Input Boolean I had to alter the code to set it on/off as it’s not a switch for example: hass.services.call('input_boolean', 'turn_on', {'entity_id': entity_id}) Maybe I could have created a switch instead but the guides led me to think a Input Boolean was what I needed here. FYI, I will use this ON/OFF to control things like charging the car/powerwall at the best prices during the night.

The “missing data” was actually there…it just didn’t show up in portrait mode on my iPad!

Everything is working fine now, thanks for putting it out there

1 Like

Really pleased you got it working. I have issues open On github for both the GMT thing and adding the ability to call whichever service you like but just haven’t been able to spend the time on it lately.
Great to here how you’re planning to use it for the car/powerwall!

@Markg, IIRC, the raw Agile data has “Z” as the timezone. Python cannot handle a timezone specified as “Z”. You need to replace the “Z” in the datetime string with “+00:00” before using fromisoformat so Python interprets it correctly. If not, it will treat the time received as ‘local’ time. It is a ‘feature’ not a ‘bug’.

1 Like

Hi, I’m very new to HA but I’m pleased to see a few names here which I recognise from the Octopus forum.

I recently managed to get Badguy’s Octoblock working and I can now configure it. I’ve been thinking of useful things I can do with it (apart from the obvious) and one not-so-useful is I’d like to try is adjusting the colour of a light depending on current Agile cost, maybe ultimately on a graduating scale but initially green, yellow, red would do. So sort the day’s prices into order and each third gets a different colour. (I realise there are other approaches I could make).

Having scouted the forum for help I think I’m maybe trying to run before I can walk but I just thought I’d post here in case anyone has done anything similar. (In my mind this will be the pre-cusrsor for other things).

What on earth is going on with Agile rates.

I calculated my cost per day about 2 months ago and did so again today - it has increased three fold with no significant changes here . There are almost no green rates now and no blue at all. Peak rate is 35p KW/hr

Beware…

Others can explain it better but there is nowhere near as much nuclear online for one reason or another right now, and as a result supply is more closely matched to demand, so the Agile prices will be higher than they were.

The weekend ought to be cheaper and I am hoping it generally gets a bit cheaper (otherwise I’ll change tariffs!) but it is still quite comfortably beating all other Octopus tariffs over (say) a month.

1 Like

can you add your custome app to HACS?

OctopusAgile:
  region_code: E
  mpan: 141335591XXXSS
  serial: 20L3198XXX
  auth: sk_live_HPsy4W7NJClQnHCfPDmXXXXSX
  startdate: 2020-08-24
  moneymakers:
  timers:
  run_devices:
  - energy_time: 1
    entity_id: whatever
    run_time: 1
  - energy_time: 2
    entity_id: whateves
    run_time: 2

got that in the configure and I get the [octopusagile.rates] after about 5 mins however I never get the run_devices called whatever or whateves, any ideas on why?

Hi @ladaowner, if I remember correctly you need “ run_before: ‘08:00:00’” in there as well, so something like below, depending on your preference to run before.

  - energy_time: 2
    entity_id: whatever
    run_before: ‘08:00:00‘
    run_time: 2

After a restart the values should be populated on the next half hour, or you can call the octopusagile.half_hour service if you don’t want to wait.

I really want to do this, I’ve just not had time to spend on it recently, hopefully will get to it soon!

run_before worked a treat.

As for HACS sounds like you are in the same boat as me, too many things and not enough time to do them all.

How do you automate the rates to update at startup rather than waiting 30 mins? I got this so far

- alias: octopus_agile_update_on_tartup
  initial_state: 'on'
  trigger:
    - platform: homeassistant
      event: start      
  action:
    - delay: '00:00:30'      
    - service: homeassistant.turn_on
      entity_id: octopusagile.XXXXXXXX
    - delay:  '00:00:10'      
    - service: homeassistant.turn_on
      entity_id: octopusagile.half_hour

but what goes in place of the XXXXXX

can anybody help with the above?

I think it’ll be something like this, noting that I haven’t tested it:

- alias: octopus_agile_update_on_tartup
  initial_state: 'on'
  trigger:
    - platform: homeassistant
      event: start      
  action:
    - delay: '00:00:30'      
      service: octopusagile.half_hour

that got it working thanks.

Is it me or is the cheapest 1 hour block out by an hour? Looking at the rate and the octopus web site it should be 3am to 4am however the more info show 1hour = 2 am to 3am. Is it something to do with BST vs UTC?

Have you set your timezone in Config/General?

02:00:00Z - the Z is indicating Zulu, so basically UTC. So you are right, the joys of daylight savings time.

The time inside the docker is correct. TZ=Europe/London

The time zone inside Home Assistant/general is now correct.

I have rebooted twice.

But still the time slots are one hour out and in Z time?

Any more suggestions?

Time the screen shot was grabbed is 10:11 am GMT

octoblock:
  module: octoblock
  class: OctoBlock
  region: E
  use_timezone: fasle
  blocks:

changed use_timezone: to true and now it is all good.

Isn’t Octoblock a different integration? And false is spelt wrong!