Skip to content

Instantly share code, notes, and snippets.

@bayees
Created January 8, 2022 09:01
Show Gist options
  • Save bayees/ae23fa25d164691e7de3f6e254f7fe03 to your computer and use it in GitHub Desktop.
Save bayees/ae23fa25d164691e7de3f6e254f7fe03 to your computer and use it in GitHub Desktop.
type: custom:apexcharts-card
graph_span: 48h
header:
title: Electricity prices Today (kr/kWh)
show: true
span:
start: day
now:
show: true
label: Now
series:
- entity: sensor.nordpool_kwh_dk2_dkk_3_10_025
type: column
data_generator: |
return entity.attributes.raw_today.map((start, index) => {
return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
});
- entity: sensor.nordpool_kwh_dk2_dkk_3_10_025
type: column
data_generator: |
return entity.attributes.raw_tomorrow.map((start, index) => {
return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment