Tibber - Schedul prices upcoming 24 hours prices!

Hi everyone,

I have now also tinkered with it a bit and am very happy with the result. Since the code in this thread helped me so much, I’ll post mine here too. Maybe it will help one or the other.

Many greetings
MrM

image

Apex Chart Config:

type: custom:apexcharts-card
experimental:
  color_threshold: true
apex_config: null
header:
  show: true
  title: Tibber Preisvorschau
  standard_format: true
  show_states: true
  colorize_states: false
now:
  show: true
hours_12: false
graph_span: 30h
span:
  start: day
yaxis:
  - id: kWh
    decimals: 3
    opposite: true
    max: 1000
    apex_config:
      tickAmount: 4
  - id: EUR
    decimals: 3
series:
  # Aktueller Verbrauch als Graph
  - entity: sensor.energieverbrauch_aktuell  # <--- You may edit this to your sensor
    type: area
    show:
      legend_value: false
      extremas: false
    name: Verbrauch
    stroke_width: 5
    curve: smooth
    color: '#ffbd5c'
    opacity: 0.5
    yaxis_id: kWh
    group_by:
      func: avg
      duration: 60min
  # Tibber - Verlauf
  - entity: sensor.tibber_preise  # <--- You may edit this to your sensor (if you use the configuration.yaml code from jonas21 it would be "tibber_prices" [generated from name])
    name: Tibber
    stroke_width: 5
    float_precision: 3
    curve: smooth
    color: '#ffbd5c'
    opacity: 1
    color_threshold:
      - value: 0.35
        color: '#a83232'
      - value: 0.27
        color: '#f0ec16'
      - value: 0.2
        color: '#00ff2f'
    show:
      legend_value: false
      extremas: false
      in_header: false
    extend_to: now
    yaxis_id: EUR
    data_generator: |
      var today = entity.attributes.today.map((record, index) => {
              return [record.startsAt, record.total];
            });
      var tomorrow = entity.attributes.tomorrow.map((record, index) => {
              return [record.startsAt, record.total];
            });

      return today.concat(tomorrow);
  # Tibber - Aktueller Preis
  - entity: sensor.electricity_price_tibber # <--- You may edit this to your sensor
    name: Aktueller Preis
    extend_to: now
    float_precision: 3
    show:
      extremas: false
      in_chart: false
    stroke_width: 5
    yaxis_id: EUR
2 Likes