Update docs for EnergyZero integration (#36291)

This commit is contained in:
Klaas Schoute 2024-12-11 13:50:52 +01:00 committed by GitHub
parent 7db5c13c27
commit bdba56d9fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,7 @@ ha_platforms:
ha_integration_type: integration
---
The EnergyZero integration integrates the [EnergyZero](https://www.energyzero.nl/) API platform with Home Assistant.
The **EnergyZero** {% term integration %} integrates the [EnergyZero](https://www.energyzero.nl/) API platform with Home Assistant.
The integration makes it possible to retrieve the dynamic energy/gas prices
from EnergyZero in order to gain insight into the price trend of the day and
@ -32,6 +32,18 @@ Partners who are a reseller from EnergyZero:
{% include integrations/config_flow.md %}
## Use cases
With the [energy dashboard](/energy) you can use the `current hour` price entity to calculate how much the electricity or gas has cost each hour based on the prices from EnergyZero. Or use one of the actions in combination with a [template sensor](#prices-sensor-with-response-data) to show the prices for the next 24 hours in a chart on your dashboard.
## Data updates
The integration will poll the EnergyZero API every 10 minutes to update the data in Home Assistant.
## Known limitations
The prices retrieved via the API are bare prices including VAT, however an energy company also charges other rates such as **energy tax** and **purchase costs**. The integration has no configuration option to add these values, but you could create a [template sensor](#all-in-price-sensor) for this.
## Sensors
The EnergyZero integration creates a number of sensor entities for both gas and electricity prices.
@ -64,12 +76,12 @@ Fetches the gas prices. The `config_entry` value be found using the **Actions**
| Data attribute | Optional | Description | Example |
| -------------- | -------- | ---------------------------------------------------- | -------------------------------- |
| `config_entry` | no | Config entry to use. | 1b4a46c6cba0677bbfb5a8c53e8618b0 |
| `config_entry` | no | Config entry ID to use. | 1b4a46c6cba0677bbfb5a8c53e8618b0 |
| `incl_vat` | no | Defines whether the prices include or exclude VAT. | false |
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
| `end` | yes | End time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
### Response data
#### Response data
The response data is a dictionary with the gas timestamps and prices as string and float values.
@ -97,14 +109,14 @@ The response data is a dictionary with the gas timestamps and prices as string a
Fetches the energy prices. The `config_entry` value be found using the **Actions** tab in the **Developer Tools**, selecting the desired entity and then switching to YAML.
| Data attribute | Optional | Description | Example |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| `config_entry` | no | Config entry to use. Can be found using the **Actions** tab in the **Developer Tools** and switching to YAML. | 1b4a46c6cba0677bbfb5a8c53e8618b0 |
| `incl_vat` | no | Defines whether the prices include or exclude VAT. | false |
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
| `end` | yes | End time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
| Data attribute | Optional | Description | Example |
| -------------- | -------- | ---------------------------------------------------- | -------------------------------- |
| `config_entry` | no | Config entry ID to use. | 1b4a46c6cba0677bbfb5a8c53e8618b0 |
| `incl_vat` | no | Defines whether the prices include or exclude VAT. | false |
| `start` | yes | Start time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
| `end` | yes | End time to get prices. Defaults to today 00:00:00 | 2023-01-01 00:00:00 |
### Response data
#### Response data
The response data is a dictionary with the energy timestamps and prices as string and float values.
@ -127,9 +139,13 @@ The response data is a dictionary with the energy timestamps and prices as strin
{% endraw %}
### Add response to sensor
## Templates
The response data can be added to a template sensor:
Create template sensors to display the prices in a chart or to calculate the all-in hour price.
### Prices sensor with response data
To use the response data from the actions, you can create a template sensor that updates every hour.
{% raw %}
@ -153,3 +169,32 @@ template:
```
{% endraw %}
### All-in price sensor
To calculate the all-in hour price, you can create a template sensor that calculates the price based on the current price, energy tax, and purchase costs.
{% raw %}
```yaml
template:
- sensor:
- name: EnergyZero all-in current price
unique_id: allin_current_price
icon: mdi:cash
unit_of_measurement: "€/kWh"
state_class: measurement
state: >
{% set energy_tax = PUT_HERE_THE_PRICE %}
{% set purch_costs = PUT_HERE_THE_PRICE %}
{% set current_price = states('sensor.energyzero_today_energy_current_hour_price') | float(0) %}
{{ (current_price + energy_tax + purch_costs) | round(2) }}
```
{% endraw %}
## Removing the integration
This integration follows standard integration removal steps. If you also use the template sensors, you need to remove them manually.
{% include integrations/remove_device_service.md %}