Last active
September 18, 2022 21:02
-
-
Save jarkkosyrjala/74268154ec151d001ccb3f820618ce95 to your computer and use it in GitHub Desktop.
Nordpool ApexCharts-Card Configuration for Home Assistant. See: https://github.com/custom-components/nordpool and https://github.com/RomRider/apexcharts-card
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type: custom:apexcharts-card | |
header: | |
show: true | |
title: ⚡️ Hinnat tänään ja huomenna | |
show_states: true | |
colorize_states: true | |
graph_span: 24h | |
all_series_config: | |
stroke_width: 2 | |
type: column | |
transform: return x / 100; | |
unit: c/kWh | |
show: | |
legend_value: false | |
in_header: false | |
group_by: | |
duration: 1h | |
span: | |
start: day | |
experimental: | |
color_threshold: true | |
now: | |
show: true | |
color: red | |
series: | |
- entity: sensor.nordpool_kwh_fi_eur_3_095_024 | |
name: Tänään | |
data_generator: | | |
const today = new Date(); | |
today.setHours(0,0,0,0); | |
return entity.attributes.today.map((val, index) => | |
[ | |
new Date(today.getTime()+index*3600000).getTime(), | |
typeof val === "number" ? val*100 : 0 | |
] | |
); | |
color_threshold: | |
- value: 0 | |
color: '#80c6ff' | |
- value: 10 | |
color: '#80ff60' | |
- value: 20 | |
color: '#ffe600' | |
- value: 30 | |
color: '#ff8000' | |
- value: 50 | |
color: '#ff0000' | |
- value: 60 | |
color: '#c60000' | |
- entity: sensor.nordpool_kwh_fi_eur_3_095_024 | |
name: Huomenna | |
type: line | |
curve: stepline | |
data_generator: | | |
const today = new Date() | |
today.setHours(0,0,0,0) | |
return entity.attributes.tomorrow.map((val, index) => [ | |
new Date(today.getTime()+index*3600000).getTime(), | |
typeof val === "number" ? val*100 : 0 | |
] | |
) || []; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is how it currently looks like:
