Skip to content

Instantly share code, notes, and snippets.

@jaakla
Created November 23, 2021 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaakla/ca50f683034026aa019de00beee00dbb to your computer and use it in GitHub Desktop.
Save jaakla/ca50f683034026aa019de00beee00dbb to your computer and use it in GitHub Desktop.
home-assistant nordpool graph
# requires this component (installed with HACS): https://github.com/custom-components/nordpool
type: 'custom:apexcharts-card'
experimental:
color_threshold: true
graph_span: 24h
header:
title: Elektrihind täna
show: true
span:
start: day
now:
show: true
label: Nüüd
series:
- entity: sensor.nordpool_mwh_ee_eur_3_10_02
type: column
data_generator: |
return entity.attributes.raw_today.map((start, index) => {
return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
});
color_threshold:
- value: 0
color: green
opacity: 1
- value: 100
color: yellow
- value: 200
color: red
type: 'custom:apexcharts-card'
experimental:
color_threshold: true
graph_span: 24h
header:
title: Elektrihind homme
show: true
span:
start: day
offset: +1day
series:
- entity: sensor.nordpool_mwh_ee_eur_3_10_02
type: column
data_generator: |
return entity.attributes.raw_tomorrow.map((start, index) => {
return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
});
color_threshold:
- value: 0
color: green
opacity: 1
- value: 100
color: yellow
- value: 200
color: red
@jaakla
Copy link
Author

jaakla commented Nov 23, 2021

Tulemus peaks tulema allolev (dark lovelace theme). Enne kl 16 homset seisu ei tea ja teine graafik on tühi.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment