Amber Electric - Change the colour of a light based on the current electricity price

Amber is an Australian electricity retailer that provides access to wholesale electricity prices.

This blueprint looks at the current price you are paying for electricity, and changes the colour of an RGB lamp, so you can decided whether to put the washing machine or dryer on.

The colors:

  • Cyan: Extremely low price
  • Green: Low price
  • Orange: Average price
  • Red: High price
  • Purple: Price spike

You can change the thresholds when configuring the automation.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

You can install the integration here:

Open your Home Assistant instance and start setting up a new integration.

You will need to be an Amber customer to access the API required by the integration.

Not a customer? You can sign up here: https://join.amber.com.au/signup

4 Likes

Was going to report that this is buggered (compared $ against c), but realised I was running an old version from HACS. Happy to report its working well now with the 2021.10 release :partying_face:

1 Like

Hi Mate, thanks for this, only switched over to Amber a week ago and wanted to give this blue print a try. I have tried downloading and creating an automation and each time i go to save it, i get an error “Response ERROR 500”

I tried using a service call to tuen the light on, thinking the colors might be an issue but it works for all the colors for

@madpilot Nice concept.

A couple of suggestions for additional features.

As you no doubt are aware Amber has traffic lights defined in its app based on cost and % renewables, it would be great if your integration could expose the upstream Amber recommendations, including the Summary, eg. Traffic light: Red Summary: ‘Use less energy if you can - it’s expensive and dirty now’. (Would be a great text to speech notification for the household :slight_smile: Maybe as attributes of the price sensor. In your blueprint the threshold values are user defined, but aren’t dynamic over time.

Second suggestion or extension really would be to include sets of devices to switch depending on traffic lights:

Green - switch on everything
Yellow - switch off time shift loads (EV Charging, Hot Water Service, dishwasher, dryer, pool pump)
Red - switch off non important loads (turn down Heating / Cooling)
Price Spike - switch off everything except critical loads

Finally, I couldn’t actually get the blueprint to work and received this error:

1 Like

I see it fixed itself after the Amber price changed. I’ll see if I can play around with the blueprint to deal with null values.

When downloading the blueprint? That sounds like a HA issue. Are you running the latest version?

apologies, HA noob here…

I’ve got this script running, the light is white but it should be green as the price descriptor is “very_low”. Is there a way I can make it echo/print/display the value of price_descriptor?

Yep! Find the automation, then click “Traces”, the “Step Details” and “Changed Variables”

The “trigger” > “to_state” > “state” bit will tell you the value.

Though, double check you selected the “General Price Descriptor” and not “General Price” sensor - the blueprint expects the former.

1 Like

Thank you so much. And yes, I had selected general_price… I’ve corrected that.

I’d like to set my indicator light to 50% brightness (or lower) overnight. I assume there is a brightness attribute I can set/trigger based on time?

Just set it to 50% manually - the brightness value should remain the same even when the automation runs.

1 Like

Myles.
Added this Blueprint to my HA today. i used an old lamp with a WIZ smart RGB globe. Great Blueprint.

Just waiting till 8PM for the colour to change.

would there be a way to have this Blueprint set up on a timer. ie turn on at a determined time and turn off say at 9pm when everything settles down.

In asking that its probably better to create an automation for the globe part.

The easiest option is to create a second automation that turns the light on and off at the times you want. The blueprint only affects colour - not light state or brightness.

3 Likes

Thank you so much Myles.

My smart meter was installed last week, so I reloaded the entities from amber and now the automation has stopped working. I deleted the automation and re-created it, but it’s still not running. Any ideas on what I should check / change would be most helpful.

The amber entities are still showing up-to-date information on the HA overview page. :pray:

Have a look at the traces - Changed variables, and see if there is a clue in there?

Thanks @madpilot, it’s not triggering automatically. Maybe it needs to see a change in the general_price_descriptor?

When I run it manually, I get the expected

Error: UndefinedError: ‘dict object’ has no attribute ‘to_state’

Ah, yep. It’s that. Retry restarting the Amber integration, that SHOULD force an update.

Well, I’m not complaining about the price_descriptor staying “very_low”… but damn you amber lol (ok, seems I need more patience lol)

Is there a way to restart the integration from the GUI?

Yep. Integrations page, click Amber then hit the hamburger

Ok, I wasn’t sure if Reload and Restart were the same - I guess in HA when referring to integrations, it is?

I clicked the Reload again and the first step worked, but when I clicked on the middle icon on the left …

Thanks for your help @madpilot. Seems that I just needed patience. amber price description changes have fixed my LED light colours :smiley: