marlar

Nordpool apexchart-card v2

Mar 7th, 2022 (edited)
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.36 KB | None | 0 0
  1. type: custom:apexcharts-card
  2. graph_span: 48h
  3. brush:
  4.   selection_span: 48h
  5.   apex_config:
  6.     chart:
  7.       height: 150px
  8.     grid:
  9.       show: true
  10.       position: back
  11.       strokeDashArray: 0.5
  12.       xaxis:
  13.         lines:
  14.           show: true
  15.     xaxis:
  16.       type: datetime
  17.       labels:
  18.         show: true
  19.         rotate: -55
  20.         rotateAlways: true
  21. span:
  22.   start: day
  23.   offset: ''
  24. header:
  25.   title: ''
  26.   show: true
  27.   show_states: true
  28.   colorize_states: true
  29. hours_12: false
  30. stacked: false
  31. experimental:
  32.   color_threshold: true
  33.   brush: true
  34. all_series_config:
  35.   show:
  36.     legend_value: false
  37.     datalabels: false
  38.     extremas: true
  39.     in_brush: true
  40.   float_precision: 2
  41.   invert: false
  42.   fill_raw: 'null'
  43.   color_threshold:
  44.     - value: -1
  45.       color: 1E90FF
  46.     - value: 2.5
  47.       color: '008000'
  48.     - value: 3
  49.       color: DAA520
  50.     - value: 4
  51.       color: FF0000
  52. now:
  53.   show: true
  54.   label: Nu
  55.   color: olive
  56. series:
  57.   - entity: sensor.nordpool_kwh_dk2_dkk_2_00_025
  58.     name: Elpris
  59.     opacity: 0.9
  60.     extend_to_end: false
  61.     type: line
  62.     curve: stepline
  63.     stroke_width: 1.5
  64.     show:
  65.       in_header: raw
  66.       in_brush: true
  67.       header_color_threshold: true
  68.     data_generator: |
  69.      return (entity.attributes.raw_today.map((start, index) => {
  70.         return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
  71.       })).concat(entity.attributes.raw_tomorrow.map((start, index) => {
  72.         return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
  73.       }));
  74. apex_config:
  75.   tooltip:
  76.     fixed:
  77.       enabled: true
  78.       position: topRight
  79.       offsetY: 10
  80.       offsetX: -25
  81.     followCursor: true
  82.   chart:
  83.     height: 400px
  84.   title:
  85.     text: Nordpool
  86.     align: Center
  87.   xaxis:
  88.     type: datetime
  89.     labels:
  90.       show: true
  91.       rotate: -55
  92.       rotateAlways: true
  93.   yaxis:
  94.     opposite: false
  95.     reversed: false
  96.     logarithmic: false
  97.     decimalsInFloat: 2
  98.     labels:
  99.       show: true
  100.     tooltip:
  101.       enabled: true
  102.     crosshairs:
  103.       show: true
  104.   legend:
  105.     show: false
  106.     floating: true
  107.     offsetY: 5
  108.   grid:
  109.     show: true
  110.     xaxis:
  111.       lines:
  112.         show: true
  113.     yaxis:
  114.       lines:
  115.         show: false
  116.     position: back
  117.     strokeDashArray: 0.5
  118.   markers:
  119.     size: 0.1
  120.  
Add Comment
Please, Sign In to add comment