Home Assistant Integration

Connect your Axle account to Home Assistant to view grid events and optimise your event participation directly from your smart home dashboard.

Overview

The Axle Home Assistant integration creates a sensor that polls for upcoming grid events. Use this to trigger automations, display event status on dashboards, or integrate with other smart home systems like Predbat.

Choose Your Integration Method

There are two ways to integrate Axle with Home Assistant:

HACS Integration

A community-built integration by Dean Hall that provides a UI-based setup through HACS. No YAML editing required.

View on GitHub

Manual YAML Configuration

Configure a REST sensor directly in your configuration.yaml. Follow the steps below.

Jump to setup

Step 1: Get Your Authentication Token

Generate an authentication token from your Axle account. This token allows Home Assistant to securely access your grid event data.

  1. Log in to your Axle account and go to Account Settings
  2. Navigate to the Home Assistant section (only available when using Events Only mode)
  3. Click Generate Token to create your authentication token
  4. Copy the token - you'll need it for the configuration below

Important: Keep your token secure and do not share it publicly.

Step 2: Add the Sensor Configuration

Add the following sensor configuration to your Home Assistant configuration.yaml file. This creates a REST sensor that polls the Axle API every 10 minutes for upcoming grid events.

Replace YOUR_TOKEN_HERE with the token you generated in Step 1. Make sure to keep the Bearer prefix and the quotes around the entire value.

yaml
sensor:
  - platform: rest
    name: Axle Event
    resource: https://api.axle.energy/vpp/home-assistant/event
    scan_interval: 600
    headers:
      Authorization: "Bearer YOUR_TOKEN_HERE"
    json_attributes:
      - start_time
      - end_time
      - import_export
      - updated_at
    value_template: >-
      {% if value_json is defined and value_json.start_time is defined %}
        {{ value_json.start_time }}
      {% else %}
        {{ none }}
      {% endif %}

After adding this configuration, restart Home Assistant for the changes to take effect. You can verify the sensor is working by checking Developer Tools > States and searching for sensor.axle_event.

Step 3: Using the Sensor

Once configured, you'll have a new sensor called sensor.axle_event with the following attributes:

AttributeTypeDescription
start_timeISO 8601 datetimeWhen the next grid event starts
end_timeISO 8601 datetimeWhen the grid event ends
import_exportstring: "import" | "export"Whether to import from or export to the grid
updated_atISO 8601 datetimeWhen the event data was last updated

Beta: These fields are subject to change. We may add or remove attributes in the future and will notify you by email before making any breaking changes. If you'd like to request additional fields, please contact us here.

Use these attributes in automations, scripts, or dashboard cards to respond to grid events. When no event is scheduled, the sensor state will be empty.