marlar

apexhart-card til elpriser fra energidataservice.dk

May 17th, 2022 (edited)
489
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.elpriser
  58.     name: DKK / kWh
  59.     opacity: 0.9
  60.     type: line
  61.     curve: stepline
  62.     stroke_width: 1.5
  63.     show:
  64.       in_header: raw
  65.       in_brush: true
  66.       header_color_threshold: true
  67.     data_generator: |
  68.      return entity.attributes.priser.map(entry => {
  69.         return [entry.HourDK, entry.TotalPriceDKK];
  70.       });
  71. apex_config:
  72.   tooltip:
  73.     fixed:
  74.       enabled: true
  75.       position: topRight
  76.       offsetY: 10
  77.       offsetX: -25
  78.     followCursor: true
  79.   chart:
  80.     height: 400px
  81.   title:
  82.     text: Energidataservice
  83.     align: Center
  84.   xaxis:
  85.     type: datetime
  86.     labels:
  87.       show: true
  88.       rotate: -55
  89.       rotateAlways: true
  90.   yaxis:
  91.     opposite: false
  92.     reversed: false
  93.     logarithmic: false
  94.     decimalsInFloat: 2
  95.     labels:
  96.       show: true
  97.     tooltip:
  98.       enabled: true
  99.     crosshairs:
  100.       show: true
  101.   legend:
  102.     show: false
  103.     floating: true
  104.     offsetY: 5
  105.   grid:
  106.     show: true
  107.     xaxis:
  108.       lines:
  109.         show: true
  110.     yaxis:
  111.       lines:
  112.         show: false
  113.     position: back
  114.     strokeDashArray: 0.5
  115.   markers:
  116.     size: 0.1
  117.  
RAW Paste Data Copied