Amber Electric Usage custom component

If you live in Australia, joined Amber because of its nice and transparent APIs (like me), and don’t have a whole house energy monitoring device. Hope this custom component gives you a bit of a remedy. GitHub - Tmbao/amberelectric-usages

The main feature is that it fetches the energy usages from Amber API, and populates them retrospectively to HA statistics, so that you can see them easily in your HA energy dashboard.

The setup flow is similar to the component built into HA core. After that, you’ll get some statistics for your electricity usage and cost. It’s subject to the limitation of the usages in Amber app, data will be delayed and only available on the next day. Also a limitation of retro data is that it cannot be more granular than hourly, but Amber data is only per 30 min interval anyway.

Enjoy!

Edit, installation guide:

  1. Make sure that you’ve had HACS installed (see here for instructions)
  2. Once HACS is installed, add the amberelectric-usages github repo as a custom repository, then you should be able to find this integration (amberelectric-usages) via HACS
  3. Once you’ve downloaded the integration, make sure to restart your home assistant,
  4. Come to Devices & Services in your Settings, hit Add Integration and find Amber Electric Usages. You’ll need the API key to use this integration, which can be obtained following this other instruction.
2 Likes

Oh, nice!

Are you saying that the usage stats don’t normally come through the default Amber sensors, so this component makes extra API calls to retrieve the usage information?

Yes that’s correct

Hey thanks for putting this together. I have both the amber integration and now the usage integration installed. And I have usage appearing in the energy dashboard using this integration. I have two questions you may have already solved for ;

(1) When you setup the energy dashboard with the usage sensor, is it possible to also add the amber general price to the energy dashboard associated with that usage? I assume that it is difficult because the usage is delayed and price data is realtime sensors.

(2) I have Home Assistant setup to export sensors to InfluxDB for a longer time view. This includes the amber integration realtime price etc sensors. I dont think the usage data from this integration will go into Influxdb as there are no associated sensors. Do you know any easy / alternate way to direct the usage data from this integration to Influxdb?

Thank you.

Hey, thanks for this.

I am new to Home Assistant. Just wondering, how should I install and use this component for getting the kind of dhasboard that you have shown?

Appreciate all the help.

Cheers.

Update: I figured it out. Thanks for your amazing work

1 Like

Can you please tell me how you did it? I am still trying to work it out. Thanks.

I would like some help too. Thankyou.

Hi at which step are you currently struggling?

Edit: I’ve updated the original thread with some instructions

Hi, when I tried to search for amberelectric-usages in HACS, nothing comes up. Can someone please advise?
thanks

Oh sorry I forgot one step, you’ll need to add the github repo to your HACS custom repositories
image

Thanks I’ve done that now, but when adding as integration, I get a failed setup, will retry message after I enter my Amber API key and select my NMI.

Just another bit of info, when I hover over “failed setup”, as per above screenshot, it says Invalid statistic_id. Not sure if that provides any clues as to why my integration isn’t working. Sorry I’m fairly new to using home assistant, so any help is greatly appreciated!

That’s all good, in your Settings > System > Logs, you should be able to find more details about the issue. Can you share that specific logs that related to amberelectric usages here, I can help diagnose the issue

The only entity I have is “amber usages latest time”. There is no other data?

The integration writes directly to HA statistics so you wouldn’t find them under the entities linked to the integration (due to some limitation of writing historical data in HA).

To find the statistics, go to Developer Tools > Statistics and search for amber. However, these statistics can be used in your energy dashboard :slight_smile:

Thank you .