Skip to content

hass-energy/amber-express

Repository files navigation

Amber Express

Faster Amber Electric pricing for Home Assistant and HAEO

Release License HACS Buy Me A Coffee


A Home Assistant custom integration for Amber Electric that provides faster real-time electricity pricing with smart polling and WebSocket support.

Features

  • Simple Setup: Just like the official integration - enter your API key, select a site, and you're done
  • Smart Polling: Adapts and learns when confirmed prices typically arrive and polls at those times to fetch latest prices as fast as possible
  • Forecasting: Provides price forecasts for both import and feed-in channels for automations and optimizers
  • Flexible Pricing: Choose between AEMO-based pricing (per_kwh) or Amber's predicted pricing (advanced_price_predicted)
  • Waits for Confirmation: Holds previous prices until confirmed values arrive, with configurable timeout control
  • Demand Window Pricing: Optionally add a surcharge during demand windows for optimization-focused automations
  • WebSocket Support: Supports real-time updates via Amber's WebSocket API (alpha feature) as a redundant data source to polling
  • HAEO Compatible: Forecast sensors are fully compatible with HAEO for energy optimization

Screenshots

Sensors Diagnostics
Amber Express sensors Amber Express diagnostics

Installation

HACS (Recommended)

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Or manually:

  1. Open HACS in Home Assistant
  2. Click on "Integrations"
  3. Click the three dots in the top right and select "Custom repositories"
  4. Add this repository URL and select "Integration" as the category
  5. Click "Install"
  6. Restart Home Assistant

Manual Installation

  1. Copy the custom_components/amber_express folder to your Home Assistant's custom_components directory
  2. Restart Home Assistant

Configuration

  1. Go to Settings > Devices & Services
  2. Click Add Integration
  3. Search for "Amber Express"
  4. Enter your Amber API token (get one from Amber Developer Settings)
  5. Select your site
  6. Optionally configure the integration options

Options

Amber Express supports the following per-site options:

  • Site name: Display name used for the Home Assistant device and entities
  • Pricing mode: Choose the price field used by sensors
    • per_kwh: AEMO-based pricing (this is what the Amber App displays to users)
    • advanced_price_predicted: Amber advanced predicted pricing (this is what Amber SmartShift uses, and recommended for optimizers)
  • Enable WebSocket: Enables Amber WebSocket updates as a secondary real-time data source
  • Wait for confirmed prices: Enabled by default; holds previous interval price until confirmation
  • Confirmation timeout (seconds): Maximum wait before publishing falling back to estimate price
  • Forecast intervals: Number of future intervals returned by forecast sensors
  • Demand Window Price ($/kWh): Adds a configurable surcharge to general channel prices during demand windows

Adding a demand window price helps optimizers such as HAEO avoid importing during the demand window.

HAEO Integration

The forecast sensors are designed to work seamlessly with HAEO. Simply add the forecast sensors to your HAEO Grid element configuration:

# Example: Use in HAEO
Import Price: sensor.amber_express_general_forecast
Export Price: sensor.amber_express_feed_in_forecast

Smart Polling

Amber Express learns when confirmed prices typically arrive and schedules its polling at the most likely times.

  1. At the start of each 5-minute interval, polls to get the initial estimate price and forecast
  2. Tracks when confirmed prices historically arrive and times subsequent polls accordingly
  3. Stops polling once confirmed price is received

This adaptive approach typically delivers confirmed prices within seconds of publication.

Forecasting

Amber Express includes forecast attributes for both import and feed-in channels.

  • Forecast length is configurable using the Forecast intervals option
  • Forecast sensors update with each polling cycle and can be consumed directly by automations
  • Forecast entities are designed to integrate easily with optimizers such as HAEO

WebSocket Support

The integration will (optionally) connect to Amber's WebSocket API for real-time push updates. This is an alpha feature from Amber and cannot be currently relied upon, so it is used in tandem, getting prices from whichever API is faster.

Comparison

Feature Amber Express amber2mqtt Amber Electric
Polling Adaptive (learns timing) Scheduled (you configure) Fixed 1-minute
Update Speed Fastest Fast Slow
Waits for Confirm Configurable Always No
WebSocket Optional (alpha) No No
Environment Native Integration Addon + Requires MQTT Native Integration

Credits

This integration is inspired by:

License

MIT License

About

Home Assistant integration for Amber Electric with adaptive polling, WebSocket support, and HAEO compatibility

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors