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.
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 GitHubManual YAML Configuration
Configure a REST sensor directly in your configuration.yaml. Follow the steps below.
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.
- Log in to your Axle account and go to Account Settings
- Navigate to the Home Assistant section (only available when using
Events Onlymode) - Click Generate Token to create your authentication token
- 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.
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:
| Attribute | Type | Description |
|---|---|---|
| start_time | ISO 8601 datetime | When the next grid event starts |
| end_time | ISO 8601 datetime | When the grid event ends |
| import_export | string: "import" | "export" | Whether to import from or export to the grid |
| updated_at | ISO 8601 datetime | When 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.