Home Assistant
Integrate Joulo charger data into your Home Assistant smart home setup
Joulo's API works with Home Assistant's RESTful sensor integration. Add your charger status, active session data, and energy totals as sensors in your HA dashboard.
Prerequisites
- A Joulo account with at least one connected charger
- An active API token (generate one from Settings → API in the dashboard)
- Home Assistant with access to edit
configuration.yaml
Configuration
Add the following to your configuration.yaml. Replace YOUR_API_TOKEN with your actual token.
rest:
- resource: https://api.joulo.nl/functions/v1/api/chargers?token=YOUR_API_TOKEN
scan_interval: 60
sensor:
- name: "Joulo Charger Status"
value_template: "{{ value_json.chargers[0].status }}"
- name: "Joulo Is Charging"
value_template: "{{ value_json.chargers[0].is_charging }}"
- name: "Joulo Session kWh"
value_template: >-
{{ value_json.chargers[0].current_session.kwh_so_far | default(0) }}
unit_of_measurement: "kWh"
device_class: energy
- resource: https://api.joulo.nl/functions/v1/api/energy?token=YOUR_API_TOKEN
scan_interval: 3600
sensor:
- name: "Joulo Total kWh"
value_template: "{{ value_json.total_kwh }}"
unit_of_measurement: "kWh"
device_class: energy
- name: "Joulo Total ERE"
value_template: "{{ value_json.total_ere_credits }}"The token query parameter is used instead of the Authorization header because Home Assistant's RESTful sensor makes it simpler to pass authentication this way.
Sensors explained
| Sensor | Source | Poll interval | Description |
|---|---|---|---|
| Joulo Charger Status | /chargers | 60s | Connection status of your first charger |
| Joulo Is Charging | /chargers | 60s | Boolean — whether the charger is actively charging |
| Joulo Session kWh | /chargers | 60s | Energy delivered in the current session (0 if not charging) |
| Joulo Total kWh | /energy | 1h | Lifetime total energy across all chargers |
| Joulo Total ERE | /energy | 1h | Lifetime total ERE-credits earned |
Multiple chargers
If you have more than one charger, adjust the array index in the templates. For example, your second charger would use value_json.chargers[1].status.
For a more robust setup, you can create a template sensor that finds a charger by nickname:
template:
- sensor:
- name: "Garage Charger Status"
state: >-
{% set charger = value_json.chargers | selectattr('nickname', 'equalto', 'Garage') | first %}
{{ charger.status if charger else 'unknown' }}Energy dashboard
To add Joulo energy data to the Home Assistant energy dashboard, use the Joulo Total kWh sensor as a "Grid consumption" or custom energy source. Since it reports a monotonically increasing total, HA can calculate daily/monthly usage automatically.
Set scan_interval for the /energy endpoint to 3600 (1 hour) or higher — the data is aggregated monthly and doesn't change frequently.