Advertisement
tlse72

ApexCharts Nordpool

Jan 13th, 2025
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.77 KB | None | 0 0
  1. type: custom:apexcharts-card
  2. apex_config:
  3.   chart:
  4.     height: 250px
  5.   legend:
  6.     showForSingleSeries: true
  7.   plotOptions:
  8.     bar:
  9.       borderRadius: 0
  10.   yaxis:
  11.     min: 0
  12.     decimalsInFloat: 2
  13.     tickAmount: 10
  14.     forceNiceScale: true
  15. all_series_config:
  16.   show:
  17.     offset_in_name: false
  18. header:
  19.   title: Dagens och morgondagens elpriser
  20.   show: true
  21.   show_states: true
  22.   colorize_states: true
  23. graph_span: 2d
  24. experimental:
  25.   color_threshold: true
  26. span:
  27.   start: day
  28. now:
  29.   show: true
  30.   label: Now
  31. series:
  32.   - entity: sensor.nordpool_kwh_se3_sek_3_10_025
  33.     name: Idag
  34.     unit: Öre
  35.     data_generator: |
  36.      return entity.attributes.raw_today.map((entry) => {
  37.         return [new Date(entry.start), entry.value * 100];
  38.       });
  39.     type: column
  40.     show:
  41.       legend_value: false
  42.       in_header: false
  43.     color_threshold:
  44.       - value: 5
  45.         color: green
  46.       - value: 150
  47.         color: orange
  48.       - value: 250
  49.         color: red
  50.   - entity: sensor.nordpool_kwh_se3_sek_3_10_025
  51.     name: Imorgon
  52.     unit: Öre
  53.     data_generator: |
  54.      return entity.attributes.raw_tomorrow.map((entry) => {
  55.         return [new Date(entry.start), entry.value * 100];
  56.       });
  57.     type: column
  58.     show:
  59.       legend_value: false
  60.       in_header: false
  61.   - entity: sensor.nordpool_kwh_se3_sek_3_10_025
  62.     attribute: min
  63.     type: column
  64.     color: green
  65.     float_precision: 2
  66.     stroke_width: 2
  67.     name: Dagens lägsta
  68.     group_by:
  69.       duration: 1d
  70.     show:
  71.       in_chart: false
  72.       legend_value: false
  73.   - entity: sensor.nordpool_kwh_se3_sek_3_10_025
  74.     attribute: average
  75.     type: column
  76.     color: black
  77.     float_precision: 2
  78.     stroke_width: 2
  79.     name: Snittpris idag
  80.     group_by:
  81.       duration: 1d
  82.     show:
  83.       in_chart: false
  84.       legend_value: false
  85.   - entity: sensor.nordpool_kwh_se3_sek_3_10_025
  86.     attribute: max
  87.     type: column
  88.     color: red
  89.     float_precision: 2
  90.     stroke_width: 2
  91.     name: Dagens högsta
  92.     group_by:
  93.       duration: 1d
  94.     show:
  95.       in_chart: false
  96.       legend_value: false
  97.   - entity: sensor.nordpool_kwh_se3_sek_3_10_025
  98.     name: Just nu
  99.     color: orange
  100.     type: column
  101.     show:
  102.       in_chart: false
  103.     float_precision: 2
  104.   - entity: sensor.nordpool_kwh_se3_sek_3_10_025
  105.     type: column
  106.     name: nu
  107.     show:
  108.       legend_value: false
  109.       in_header: false
  110.     data_generator: |
  111.      return entity.attributes.raw_today.map((entry) => {
  112.                     const nu = new Date()
  113.                     const series_entry = new Date(entry.start)
  114.                     if(nu.getHours() == series_entry.getHours())
  115.                     {return [series_entry, entry.value * 100]}
  116.                     return [series_entry,0 ];
  117.                   });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement