Advertisement
dmcn

Untitled

Aug 19th, 2022
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.94 KB | None | 0 0
  1. type: custom:apexcharts-card
  2. graph_span: 24h
  3. experimental:
  4.   color_threshold: true
  5. header:
  6.   title: Strømpriser 24h (kr/kWh)
  7.   show: false
  8. apex_config:
  9.   yaxis:
  10.     min: 0
  11.     max: 3
  12. hours_12: false
  13. span:
  14.   start: hour
  15.   offset: '-1h'
  16. now:
  17.   show: true
  18.   label: Nu
  19. series:
  20.   - entity: sensor.nordpool_kwh_dk1_dkk_3_10_0
  21.     type: column
  22.     data_generator: |
  23.      return (entity.attributes.raw_today.map((start, index) => {
  24.         return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
  25.       })).concat(entity.attributes.raw_tomorrow.map((start, index) => {
  26.         return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
  27.       }));
  28.     color_threshold:
  29.       - value: 0
  30.         color: green
  31.       - value: 1
  32.         color: orange
  33.       - value: 2
  34.         color: red
  35.       - value: 3
  36.         color: darkred
  37.       - value: 4
  38.         color: black
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement