Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:apexcharts-card
- apex_config:
- chart:
- height: 150px
- toolbar:
- show: true
- offsetY: -27
- tools:
- selection: true
- download: false
- zoom: false
- zoomin: true
- zoomout: true
- pan: false
- reset: true
- zoom:
- enabled: true
- dataLabels:
- enabled: true
- style:
- fontSize: 10px
- colors:
- - "#fff"
- distributed: true
- background:
- enabled: false
- xaxis:
- labels:
- format: HH
- axisBorder:
- show: true
- color: grey
- plotOptions:
- bar:
- dataLabels:
- position: bottom
- maxItems: 32
- hideOverflowingLabels: true
- orientation: vertical
- columnWidth: 90%
- all_series_config:
- unit: " kr."
- experimental:
- color_threshold: true
- header:
- title: Elpriser pr. time (kr/kWh)
- show: true
- standard_format: false
- graph_span: 20h
- span:
- start: hour
- offset: "-0h"
- yaxis:
- - min: 0
- max: ~2
- apex_config:
- tickAmount: 4
- series:
- - entity: sensor.energi_data_service
- type: column
- name: Inkl. afgifter
- data_generator: |
- var today = entity.attributes.raw_today.map((start, index) => {
- return [new Date(start["hour"]).getTime(), entity.attributes.raw_today[index]["price"]];
- });
- if (entity.attributes.tomorrow_valid) {
- var tomorrow = entity.attributes.raw_tomorrow.map((start, index) => {
- return [new Date(start["hour"]).getTime(), entity.attributes.raw_tomorrow[index]["price"]];
- });
- var data = today.concat(tomorrow);
- } else {
- var data = today
- }
- return data;
- float_precision: 2
- color_threshold:
- - value: 0
- color: green
- - value: 1.5
- color: orange
- - value: 3
- color: red
- - value: 5
- color: darkred
- show:
- legend_value: false
- in_header: false
- datalabels: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement