This is an integration for the Home Assistant for the price forecast using this library.
- Open your Home Assistant in a browser.
- In case you don't have HACS, follow the steps from here https://hacs.xyz/docs/configuration/basic.
- In the left menu you should have HACS icon, click it.
- Click on
Integrations
-> click 3 dots top right corner -> clickCustom repositories
. - In the dialog window, add
https://github.com/openkfw/smartenergy.awattar
as a repository and selectIntegration
as a category. - Click
ADD
, wait for spinner to finish and close the dialog. - Click
EXPLORE & DOWNLOAD REPOSITORIES
-> search forAwattar
-> select theAwattar -> wait and click
DOWNLOAD`. - Go to Settings -> System -> click
RESTART
and wait few seconds. - Go to Settings -> Devices & Services. Click the
ADD INTEGRATION
button. - Search for
Awattar
-> click -> fill in details -> clickSUBMIT
.
Example config:
TBD
Make sure that there is no trailing slash in the API host, otherwise the validation fails. When pressing submit, validation will also check the connectivity and fails if not able to connect and authenticate.
- Go to the dashboard screen, you should see bunch of sensors for the Awattar integration.
Since the forecast is an array of values, it's not possible to nicely display by default as a card. However, you can install this integration https://github.com/RomRider/apexcharts-card. In the card configuration provide:
type: custom:apexcharts-card
graph_span: 1d
span:
start: hour
header:
show: true
title: Awattar Price Forecast
show_states: true
colorize_states: true
now:
show: true
label: Now
series:
- entity: sensor.smartenergy_awattar_forecast
data_generator: |
return entity.attributes.forecast.map((f, index) => {
return [f.start_time, f.marketprice];
});
Outcome should look like this:
Name | Attributes | Description |
---|---|---|
smartenergy_awattar_forecast |
forecast |
Sensor having the forecast attribute containing the 24 hour forecast for the Awattar prices. |
The integration can be configured either via UI (config flow) as described in the How to use it - HACS section or via configuration.yaml
. For example:
smartenergy_awattar:
country: de
In case you are interested in development, check the guide here.