Help with creating current energy use graphs

Did you put this code in the config file?

type: vertical-stack
cards:
  - type: custom:gap-card
    height: 5
  - type: horizontal-stack
    cards:
      - type: custom:apexcharts-card
        header:
          title: Energie verbruik
          show: true
          show_states: true
          colorize_states: false
        graph_span: 2h
        layout: minimal
        series:
          - entity: sensor.power_consumption_w
            name: ' '
            unit: ' Watt'
            color: '#00648e'
            opacity: 0.5
            type: area
            curve: smooth
            stroke_width: 2
        apex_config:
          stroke:
            show: true
          legend:
            show: false
          yaxis:
            show: false
          chart:
            height: 175px
      - type: custom:apexcharts-card
        header:
          title: Oplevering Zonnepanelen
          show: true
          show_states: true
          colorize_states: false
        graph_span: 2h
        layout: minimal
        series:
          - entity: sensor.solaredge_current_power
            name: ' '
            unit: ' Watt'
            color: '#ffaa5b'
            opacity: 0.5
            type: area
            curve: smooth
            stroke_width: 2
        apex_config:
          stroke:
            show: true
          legend:
            show: false
          yaxis:
            show: false
          chart:
            height: 175px
      - type: custom:apexcharts-card
        header:
          title: Netto verbruik
          show: true
          show_states: true
          colorize_states: false
        graph_span: 2h
        layout: minimal
        series:
          - entity: sensor.power_consumption_grid_pos
            name: ' '
            unit: ' Watt'
            color: '#9a001d'
            opacity: 0.5
            type: area
            curve: smooth
            stroke_width: 2
          - entity: sensor.power_consumption_grid_neg
            name: ' '
            unit: ' Watt'
            color: '#8756cb'
            opacity: 0.5
            type: area
            curve: smooth
            stroke_width: 2
        apex_config:
          stroke:
            show: true
          legend:
            show: false
          yaxis:
            show: false
          chart:
            height: 175px
      - type: entity
        entity: sensor.solaredge_storage_level
        name: Energieopslag
        state_color: true
  - type: custom:stack-in-card
    mode: vertical
    cards:
      - type: entities
        entities: []
      - type: custom:apexcharts-card
        graph_span: 6hours
        header:
          show: true
          show_states: true
          colorize_states: true
        series:
          - entity: sensor.power_consumption_w
            name: Energie verbruik
            color: '#00648e'
            opacity: 0.3
            type: area
          - entity: sensor.solaredge_current_power
            name: Zonne Energie
            color: '#ffaa5b'
            opacity: 0.4
            type: area
          - entity: sensor.power_consumption_grid_pos
            name: Netto verbruik
            color: '#9a001d'
            opacity: 0.3
            type: area
          - entity: sensor.power_consumption_grid_neg
            name: Netto Teruglevering
            color: '#8756cb'
            opacity: 0.3
            type: area
        now:
          show: true
          color: red
          label: Nu
        apex_config:
          stroke:
            show: true
            width: 2
            curve: smooth
          legend:
            show: true
          yaxis:
            show: true
          chart:
            height: 550px
      - type: custom:gap-card
        height: 5

2 Likes