This lovelace card displays the Octopus Greener Days score data, pulling the data from sensors of the excellent BottlecapDave/HomeAssistant-OctopusEnergy integration.
This provides a convenient, at a glance way to observe the weeks ahead Greener Days score provided by Octopus.
Each day is given a score out of 100. The higher the score then greener the period, ie more renewables on the grid.
The timeframe Octopus analyse is 23:00 to 06:00 each day.
Octopus highlight which evening to plug in, to take advantage of the coming overnight energy.
The easiest way to install it is via HACS (Home Assistant Community Store). This will ensure you get updates automatically too.
Simply click this button to go directly to the details page:
In the Home Assistant UI:
- Use HACS -> Frontend -> Top Right Menu -> Custom repositories
- Enter a repo of
https://github.com/elyobelyob/octopus-energy-greenness-forecast-card
and category of "Dashboard", and click the Add button - Click "Explore & Download Repositories" and start searching for "octo" and you should see the entry
- Click "Download" in the bottom right
This should automatically configure all the resources, so you can now skip to Configuration.
You can also install manually by downloading/copying the Javascript file in to $homeassistant_config_dir/www/community/
and then add the Javascript file to Lovelace in the Home Assistant UI by using
Settings -> Dashboards -> Top Right Menu -> Resources (Advanced Mode needs to be set in the user settings in Home Assistant).
If it doesn't render, try and change the query string in the resource URI e.g. ?hacstag=123123123a
Add the card to your dashboard using Add Card -> Custom: Octopus Energy Greeness Forecast Card.
You'll need to then configure the yaml yourself - the type
part is filled out for you.
The only required key is the name of the entity sensor that contains the current index.
You will need to enable this sensor with the name like sensor.octopus_energy_<your_id_here>_greenness_forecast_current_index.
The easiest way to find that entity name is by opening the Search within Home Assistant: search for greeness_index
-> click the chosen result -> choose the Settings tab -> copy Entity ID
.
Here's an example yaml configuration - replacing <your_id_here>
with your data from above.
type: custom:octopus-energy-greenness-forecast-card
currentEntity: sensor.octopus_energy_<your_id_here>_greenness_forecast_current_index
futureEntity: sensor.octopus_energy_<your_id_here>_greenness_forecast_next_index
lowLimit: 15
mediumLimit: 20
highLimit: 30
showTimes: true
showDays: 7
hour12: false
indexCase: ucf
Here's a breakdown of all the available configuration items:
Name | Optional | Default | Description |
---|---|---|---|
currentEntity | N | N/A | Name of the sensor that contains the greenness indexes, generated from the HomeAssistant-OctopusEnergy integration |
title | Y | "Greenness Forecast" | The title of the card in the dashboard (can also be set to null) |
lowLimit | Y | 20 | If the value is above lowLimit , the row is marked dark green. (this option is only applicable for import rates |
mediumLimit | Y | 40 | If the value is above mediumLimit , the row is marked orange. |
highLimit | Y | 60 | If the value is above highLimit , the row is marked red. |
showTimes | Y | false | Whether you want to show the times this greenness index applies, normally 11:00PM - 06:00 AM |
showDays | Y | 7 | Number of days to show |
showHighlighted | Y | true | Show the crown for the highlighted days |
highlightedEmoji | Y | 👑 | Change the highlighted emoji to what you want ... find one at Emojipedia. |
hour12 | Y | true | 12 or 24 hour times displayed |
indexCase | Y | uc | Changes the Index case (MEDIUM etc) ... uc (Upper Case), ucf (Upper Case First), lc (lower case) |
- If the index score is above
highLimit
, then the row is in green - If the index score is above
mediumLimit
, then the row is coloured light green - if the index score is above
lowLimit
, then the row is coloured orange - if the index score is below
lowLimit
, then the row is coloured red
This card was based on and reworked from the code lozzd/octopus-energy-rates-card.