Octopus Energy Agile Tariff

Are you specifying it all lower case? As in “sensor.octopusagile” or sensor.OctopusAgile”? The error suggests the later. It should be all lower case.

That was it. The case was incorrect. I hadn’t changed anything for months, so did something change? I know I switched from the manual installation to HACS, which I try to do where possible to keep track of updates - but I think that was some time before the error… but I could be wrong, so I guess that was where the change was and I hadn’t picked up the case sensitive. Thank you for picking that up - very embarrassing to be something so simple.

On the topic I posted about a couple of days ago - with the new Energy Dashboard in 2021.8, there is a value to track the cost - and one option is to use an entity with the current price. The sensor.octopus_agile_current_rate doesn’t come up as an entity to use. You might want to get on top of that before the new version goes live, as it would be useful to have.

1 Like

Where am I going wrong, I have been through this post so many times and just cant work it out.

octopusagile:
region_code: “H”
mpan: XXX - removed for this post
serial: XXX - removed for this post
auth: XXX - removed for this post
startdate: “2020-01-01”
sensor:

  • platform: “octopusagile”

I think you either need to wait for 1900z to roll around or call the ocotpusagile.update_timers service to populate octopusagile.all_rates (then wait for the next half hour) which is where the sensors get populated from. Failing that take a look in the logs and throw any errors on here. Hope that helps!

Hi,

I have moved over to the Go rates as opposed to Agile due to the 5p limit during the quiet hours for EV charging and wanted to know how to amend the agile rates to report the got rates in half hour slots.

Currently I have this in terms of results:

results:
  - value_exc_vat: 14.85
    value_inc_vat: 15.5925
    valid_from: '2021-08-18T03:30:00Z'
    valid_to: '2021-08-18T23:30:00Z'
  - value_exc_vat: 4.76
    value_inc_vat: 4.998
    valid_from: '2021-08-17T23:30:00Z'
    valid_to: '2021-08-18T03:30:00Z'
  - value_exc_vat: 14.85
    value_inc_vat: 15.5925
    valid_from: '2021-08-17T03:30:00Z'
    valid_to: '2021-08-17T23:30:00Z'
friendly_name: Go rates today

Which as you can see is showing the overall time slot.

My code for gather the rates is as per the Agile Rate gatherer:

- platform: rest
  name: Go rates today
  resource_template: >-
    {% set region = 'H' %}
    {% set from = as_timestamp(as_timestamp(now())|timestamp_custom('%Y-%m-%d') + 'T00:00:00') %}
    {% set to = from + 24 * 60 * 60 %}
    {% set format = '%Y-%m-%dT%H:%M:%SZ' %}
    https://api.octopus.energy/v1/products/GO-21-05-13/electricity-tariffs/E-1R-GO-21-05-13-{{ region }}/standard-unit-rates/?period_from={{ from|timestamp_custom('%Y-%m-%dT%H:%M:%SZ', False) }}&period_to={{ to|timestamp_custom('%Y-%m-%dT%H:%M:%SZ', False) }}
  value_template: >-
    {% set from = ((as_timestamp(utcnow()) / 1800)|round(0, 'floor') | int * 1800)|timestamp_custom('%Y-%m-%dT%H:%M:%SZ', False) %}
    {% if value_json.results is defined and value_json.results|count > 0 %}
      {{ as_timestamp(value_json.results[-1].valid_from)|timestamp_custom('%Y-%m-%d') }}
    {% else %}
      Unknown
    {% endif %}
  json_attributes:
    - "results"

If anyone can help it would greatly appreciated.

:slight_smile:

Hi @Markg,

I’ve been reading through this thread over the past few days and I have successfully setup the integration and it been working well, however after reading this and looking over the code i can see there are some references to the consumption and costs, and some chatter about integrating the octocost code in to your integration
i can also see there is a service to update the consumption in mt HA, and in the github a branch for the work you must have done already to bring the octocost code in.

So i was wondering if any of this is finalised at the moment, or is it still a work in progress?

I’m wondering if there are other people out there having problems with Octopus’s customer service at the moment ? One of the main attractions for me about the Agile tariff was the insight into my energy usage , but Octopus has failed to retrieve my meter readings for months now ( 127 days and counting !!! ) , when I first reported this they said it would take 6 weeks to get the ‘metering team’ to do anything and we are now nearly 3 times over that. Most of my emails aren’t even being replied to despite emails being their preferred means of communicating with their customers. Anyway just trying to get a sense of how everyone else is doing.

Not thing but trouble with their customer service with me. Would leave them if they weren’t so cheap. Emails are always ignored. Phone calls result in a promise of a reply that never comes.

The last time I spoke to them I asked them to raise a complaint so I could escalate to the ombudsman. Magically all of my issues were resolved in 48 hours and got £50 credited to my account.

1 Like

Hi all, I’m new here in the forum but heard there’s discussion of our Agile tariff. I head up a lot of our R&D and innovation including the Agile tariff and I guess some of you will have come across me before. Usually if there’s a billing issue on Agile it’s related to fetching the half hour data from the meter. Message me and I’ll take a look and see what’s going wrong.

4 Likes

I joined Octopus over a year ago to use the Agile tariff. A smart meter was installed within a few weeks but nothing went any further. I have emailed and spoken to Octopus several times always with a promise that ‘we will get back to you’ reply. Never heard anything. Never got onto Agile, and am now on month 3 of the variable tariff so 15 months must have passed. Totally rubbish service.

@AgilePhil I will PM you Philip

1 Like

@AgilePhil - Great to have you on-board Phil :slight_smile:

1 Like

Hi Kevin, did you PM me?

@AgilePhil

Hi Phil, Welcome to the conversation

So, Big question is, what is the chance that Octopus would work with the developers here of the custom components to create a fully integrated Home Assistant integration

Would be awesome if we can juts stick our details in (MPAN, API, etc) and realtime sensors are generate for our usage both historical and current and the upcoming Agile rates

Notice I said realtime as that would be awesome to be able to see exactly what my house is using as i can when I walk up to my SMETS2 IHD

What would be even better is if we could read the data logger direct from the SMETS2 meter

Cheers

9 Likes

+1, would be awesome if there was an official octopus integration. I’d be more than happy for any of my code to be reused by them :blush: I struggle to put in the amount of time the agile integration really needs/deserves.

4 Likes

@Markg And I really appreciat the work you have done thus far

2 Likes

Ok, let me see what’s possible. Could you both point me in the right direction so I can share with my team and see what we can do.

3 Likes

Hi Phil,
I came across this thread yesterday as I was just looking at creating my own integration for Home Assistant.
It would obviously be great to have an official integration, is this what you’re looking at?

I was looking at doing things like:

  • querying the API every 30 minutes for the latest gas/electric usage
  • querying the API every day shortly after the latest prices are released
  • giving the user the ability to start entities at the cheapest time, for the required period

This is/was going to be based off of https://github.com/markgdev/home-assistant_OctopusAgile integration, I believe is by @Markg . If it is, then may thanks, Mark for the hard work you have put in on this integration, but my needs started to diverge a few months ago, so I was going to folk and modify. I’m a PHP developer by trade though, and not that used to Python, so it was going to be a good learning experience for me.

I digress! As I said Phil, an official integration would be great. I think I’ll start my own custom integration anyway, in order to help me remember how to program in Python.

Thanks to all who have worked on Mark’s repo, and I look forward to seeing where all these option go.

BTW: Not sure as to what you want pointing to Phil, as I skipped to the end(ish) of this thread, but the dev docs are here https://developers.home-assistant.io/
John

1 Like

Hello,
Been using that integration (great work!) as I recently moved to Octopus and am now on the Agile tariff.

I was wondering if anyone is using the sensor.octopus_agile_current_rate in conjunction with the Energy tab.

There is an option to use a dynamic sensor to calculate the cost. Problem I have is that it doesn’t seem to work and the cost stays at £0.00

First think I noticed is that the sensor is actually represented as a string . I wrote a template to convert it to a float but the issue remains.

I posted as well on the Discord but could not get it resolved so hopefully someone here can help?

@ppmt

Am using it in the energy tab and same result

I am trying to find if that sensor needs specific attributes but can’t find anything about it in the Energy documentation
Not sure where to ask for it either