marlar

Apexchart kort for pollental

Jun 19th, 2022 (edited)
1,081
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.81 KB | None | 0 0
  1. type: custom:apexcharts-card
  2. experimental:
  3.   color_threshold: true
  4. graph_span: 5d
  5. span:
  6.   start: day
  7.   offset: ''
  8. header:
  9.   show: true
  10.   title: Græspollen
  11.   show_states: true
  12.   colorize_states: true
  13. all_series_config:
  14.   float_precision: 0
  15. series:
  16.   - entity: sensor.graespollen
  17.     name: Seneste pollental
  18.     type: column
  19.     unit: ' ppcm '
  20.     show:
  21.       in_header: raw
  22.     color_threshold:
  23.       - value: 0
  24.         color: 4caf50
  25.       - value: 1
  26.         color: ffeb3b
  27.       - value: 2
  28.         color: red
  29.     data_generator: |
  30.      return entity.attributes.prognose
  31.         .map(e => [new Date(e.date).getTime(),e.value])
  32. apex_config:
  33.   chart:
  34.     height: 400px
  35.   title:
  36.     text: Prognose
  37.     align: Center
  38.   yaxis:
  39.     min: 0
  40.     max: 3
  41.     show: false
  42.   tooltip:
  43.     enabled: false
  44.  
Add Comment
Please, Sign In to add comment