Advertisement
FlyHigh-Swe

El-graf

Sep 27th, 2022
857
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.93 KB | None | 0 0
  1. type: custom:apexcharts-card
  2. graph_span: 10d
  3. experimental:
  4.   color_threshold: true
  5.   brush: true
  6. brush:
  7.   selection_span: 2d
  8.   apex_config: null
  9. header:
  10.   title: Elpriset (Nordpool)
  11.   show: true
  12. apex_config:
  13.   yaxis:
  14.     min: 0
  15.     tickAmount: 10
  16.     forceNiceScale: true
  17.   chart:
  18.     height: 300px
  19. hours_12: false
  20. span:
  21.   start: hour
  22.   offset: '-9d'
  23. now:
  24.   show: true
  25.   label: now
  26. series:
  27.   - entity: sensor.nordpool_kwh_se3_sek_3_095_025
  28.     type: area
  29.     curve: stepline
  30.     extend_to: now
  31.     show:
  32.       in_brush: true
  33.     color: red
  34.   - entity: sensor.nordpool_kwh_se3_sek_3_095_025
  35.     name: Spotpris idag
  36.     type: area
  37.     curve: stepline
  38.     extend_to: false
  39.     show:
  40.       in_brush: true
  41.     color: red
  42.     data_generator: |
  43.      var a = entity.attributes.raw_today.map((start, index) => {
  44.         return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
  45.       });
  46.       var b = [a[a.length - 1][0] + 3600000, 0];
  47.       a.push( b );
  48.       return a;
  49.   - entity: sensor.nordpool_kwh_se3_sek_3_095_025
  50.     name: Spotpris imorgon
  51.     curve: stepline
  52.     show:
  53.       in_brush: true
  54.     data_generator: |
  55.      return entity.attributes.raw_tomorrow.map((entry) => {
  56.          return [new Date(entry.start), entry.value];
  57.        });
  58.     type: area
  59.   - entity: sensor.imported_energy_per_hour
  60.     type: line
  61.     color: black
  62.     opacity: 1
  63.     stroke_width: 2
  64.     extend_to: now
  65.     curve: stepline
  66.     group_by:
  67.       func: max
  68.       duration: 1hour
  69.   - entity: sensor.exported_energy_per_hour
  70.     type: line
  71.     color: green
  72.     opacity: 1
  73.     stroke_width: 2
  74.     extend_to: now
  75.     curve: stepline
  76.     group_by:
  77.       func: max
  78.       duration: 1hour
  79.   - entity: sensor.pv_genereted_per_hour
  80.     type: line
  81.     color: yellow
  82.     opacity: 1
  83.     stroke_width: 2
  84.     extend_to: now
  85.     curve: stepline
  86.     group_by:
  87.       func: max
  88.       duration: 1hour
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement