Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:apexcharts-card
- now:
- show: true
- label: Nu
- color: "#ffc0cb"
- locale: DK
- header:
- show: true
- title: Dagens elpriser
- show_states: true
- graph_span: 1d
- yaxis:
- - min: ~0
- apex_config:
- forceNiceScale: true
- span:
- start: day
- apex_config:
- tooltip:
- enabled: false
- chart:
- height: 350px
- plotOptions:
- bar:
- horizontal: false
- columnWidth: 90%
- borderRadius: 2
- xaxis:
- labels:
- show: true
- format: HH
- rotate: -45
- rotateAlways: true
- hideOverlappingLabels: true
- style:
- fontSize: 10
- fontWeight: 10
- legend:
- show: false
- series:
- - entity: sensor.ev_smart_charging_charging
- name: Nuværende pris
- unit: " Kr."
- data_generator: |
- function roundToHour(dateStr) {
- const date = new Date(dateStr);
- date.setMinutes(0, 0, 0);
- return date.getTime();
- }
- const seen = {};
- const result = [];
- function process(raw) {
- raw.forEach(entry => {
- const time = roundToHour(entry.start);
- if (!(time in seen)) {
- seen[time] = true;
- result.push([time, entry.value]);
- }
- });
- }
- process(entity.attributes.raw_two_days);
- return result;
- type: column
- float_precision: 2
- show:
- in_header: before_now
- extend_to: false
- color_threshold:
- - value: 0
- color: green
- - value: 2
- color: orange
- - value: 3.5
- color: red
- - value: 5
- color: darkred
- - entity: sensor.eds_today_min
- name: Min. pris
- unit: " Kr."
- float_precision: 2
- type: line
- color: transparent
- stroke_width: 0.1
- - entity: sensor.eds_today_max
- name: Maks. pris
- unit: " Kr."
- float_precision: 2
- type: line
- color: transparent
- stroke_width: 0.1
- - entity: sensor.eds_today_mean
- name: Gns. pris for dagen
- unit: " Kr."
- float_precision: 2
- type: line
- color: transparent
- stroke_width: 0.1
- experimental:
- color_threshold: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement