Skip to content

Repository files navigation

buy me a coffee hacs_badge Maintenance

Aurora+ for Home Assistant

The Aurora+ integration adds support for retrieving data from the Aurora+ API. The following sensors are available, grouped as a single device for the service.

  • Estimated Balance - This is shown in the Aurora+ app as 'Balance'
  • Dollar Value Usage (previous day)
  • Kilowatt Hour Usage (previous day)
  • Current Time of Use tariff
  • Upcoming PowerHour (offered and/or active)

Screenshot of the device page of an AuroraPlus service

It also uses https://github.com/ldotlopez/ha-historical-sensor/ to fetch hourly usage from the previous day.

  • Dollar Value Usage per-tariff
  • Kilowatt Hour Usage per-tariff

Those entities are not directly visible in the device (as their current value is always unavailable). Their statistics are stored in the Recorder, so they can be added to the Energy dashboard, to get hourly usage for the previous day.

Screenshot of the HomeAssistant Energy dashboard showing usage records from AuroraPlus

Note: To use the Aurora+ integration you need a valid account with Aurora.

Installation

The simplest way to install this integration is via the Home Assistant Community Store (HACS).

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

Configuration

This integration uses Home Assistant's config flow. Simply go to Settings / Devices & Services, choose Add Integration, and search for Aurora+.

In the configuration dialog, you need to input an OAuth access key, which allows access to your account's data without MFA. Authentication and API access is done via https://github.com/LeighCurran/AuroraPlus/, which you can also use to obtain the ID token.

The easiest way to get a fresh token is to use this page). Follow the instructions to login to AuroraPlus and provide the URL of the error page to obtain a token suitable to bootstrap authentication in HA. It should be a full JSON payload.

Local token fetching

If you'd prefer not to trust a random page on the web with your AuroraPlus credentials, you can also obtain the token locally. On any machine able to run Python (not necessarily your Home Assistant server), install the AuroraPlus Python module from the URL above. You can then follow the instructions at https://github.com/LeighCurran/AuroraPlus/tree/main?tab=readme-ov-file#obtain-a-token.

Essentially, just run

aurora_get_token

and follow the instructions (open link, enter MFA, copy URL of error page back).

Notification blueprints

It is useful to know of transitions of the Time of Use and Power Hour sensors.

Simple blueprints for automation on the most important transitions can be found in https://github.com/LeighCurran/AuroraPlusHA/tree/main/blueprints. To install them, got to Settings / Automations & Scenes / Blueprints and click Import blueprint. Or just use the buttons below: they will redirect you to your HA instance with the import paths pre-filled.

  • Time of Use notifications Import the Time of Use blueprint to your Home Assistant instance
  • Power Hour notifications Import the Power Hour blueprint to your Home Assistant instance

If you want to extend them, you can create an Automation from one of the blueprints, then Take control of it from the Automation's kebab menu on the top-right.

Running tests

$ pip install -r requirements.test.txt
$ pytest

CAVEATs

  1. The Aurora+ API doesn't deliver real-time metering, so the data for current usage will always be unavailable. It only provides updates containing data for the previous day, in daily batches. Those batches may not be available until late the next day, leading to a lag of 1 to 2 days in the energy dashboard.

  2. Upon adding the integration, only tariffs with readings on the previous week will be available to add to the energy dashboard. This could be an issue if the plan was just changed. Sensors for the new tariffs won't show up. Simply restart Home Assistant the next week for new sensors to be created.

  3. When the AuroraPlus site is under maintenance, the integration will show up as needing re-authentication. When doing so, an error message (e.g., “We are making things better”) will be shown instead of the Cradle Mountain error page. Even if a token can be obtained from that URL, it won't be sufficient to successfully authenticate.

    tl;dr: Do nothing and wait for the end of the maintenance.

  4. Support for multiple services is not complete, and would rely on matching functionality not available in the Python library yet.

Releases

Packages

Used by

Contributors

Languages