Mam problem z wykresem w Home Assistant. To kod karty:
```yaml
type: custom:layout-card
layout_type: custom:grid-layout
cards:
  - type: custom:config-template-card
    entities:
      - input_datetime.date_picker
    variables:
      offset: |
        {{states['sensor.apex_days'].state}}
    card:
      type: custom:apexcharts-card
      apex_config:
        chart:
          height: 250
          stacked: true
        plotOptions:
          columnWidth: 90%
          borderRadiusApplication: end
        fill:
          type: gradient
          gradient:
            type: horizontal
            shadeIntensity: 0.4
            opacityTo: 0.95
            inverseColors: false
      experimental:
        color_threshold: true
      graph_span: 1d
      span:
        start: day
        offset: ${offset}
      update_interval: 1h
      header:
        show: true
        title: Godzinowy bilans energii
        standard_format: false
        show_states: false
        colorize_states: true
      series:
        - entity: sensor.pv_godzinowo
          name: Produkcja PV
          opacity: 90
          type: column
          statistics:
            align: start
            type: state
          fill_raw: last
          float_precision: 2
          yaxis_id: export
          group_by:
            func: last
            duration: 1h
          stroke_width: 0.1
          show:
            datalabels: false
            header_color_threshold: false
            legend_value: false
          color: orange
        - entity: sensor.sprzedaz_godzinowa
          name: Export energii
          transform: return x *-1
          opacity: 90
          type: column
          fill_raw: last
          float_precision: 2
          yaxis_id: export
          group_by:
            func: last
            duration: 1h
          stroke_width: 0.1
          show:
            datalabels: false
            header_color_threshold: false
            legend_value: false
          color: darkorchid
        - entity: sensor.zakup_godzinowy
          name: Import energii
          opacity: 90
          type: column
          fill_raw: last
          float_precision: 2
          group_by:
            func: max
            duration: 1h
          stroke_width: 0.1
          show:
            datalabels: false
            header_color_threshold: false
            legend_value: false
          color: dodgerblue
  - type: vertical-stack
    cards:
      - type: entities
        entities:
          - input_datetime.date_picker
      - type: custom:config-template-card
        entities:
          - input_datetime.date_picker
        variables:
          offset: |
            {{states['sensor.apex_days'].state}}
        card:
          type: custom:apexcharts-card
          chart_type: pie
          graph_span: 1.1d
          update_interval: 1h
          span:
            offset: ${offset}
            end: day
          apex_config:
            chart:
              height: 300px
            legend:
              show: true
              position: right
              fontSize: 18px
            dataLabels:
              style:
                fontSize: 12px
          header:
            show: true
            title: Bilans energii
            show_states: false
            colorize_states: true
          series:
            - entity: sensor.dzienny_pobor
              name: Import
              unit: " kWh"
              statistics:
                period: day
                align: start
                type: state
              group_by:
                func: max
                duration: 1d
              float_precision: 2
              show:
                datalabels: true
                extremas: false
                header_color_threshold: false
                legend_value: true
                in_chart: true
              color: dodgerblue
            - entity: sensor.sprzedaz_dzienna
              unit: " kWh"
              name: Export
              transform: return x *1
              opacity: 90
              fill_raw: last
              float_precision: 2
              group_by:
                func: last
                duration: 1d
              show:
                datalabels: true
                header_color_threshold: false
                legend_value: true
                in_chart: true
              color: darkorchid
            - entity: sensor.deye_inverter_daily_pv_production
              name: Produkcja
              unit: " kWh"
              transform: return x *1
              opacity: 90
              fill_raw: last
              float_precision: 2
              group_by:
                func: last
                duration: 1d
              show:
                datalabels: true
                header_color_threshold: false
                legend_value: true
                in_chart: true
              color: orange
layout:
  grid-template-columns: 75% 25%
```
Sensory są i mają statystyki. Dodatki zainstalowane. Problem chyba jest w sensorach z pomocnika date_picker i sensor.apex_days. Pomocnika stworzyłem i datę wyświetla.  Do sensor.apex_days użyłem wpisu w configuration.yaml:
```
  - platform: template
    sensors:
      apex_days:
        friendly_name: "Dni do wykresów"
        icon_template: mdi:data
        value_template: >        
          {% if state_attr('input_datetime.date_picker', "timestamp")==as_timestamp(states('sensor.date')) %}
            -0d
          {% else %}
            {{ ((as_timestamp(states('sensor.date'))|float(0) - state_attr('input_datetime.date_picker', "timestamp")|float(0)))/ -86400 }}d
          {% endif %}
```
i tu coś chyba nie działa bo w Statystykach w Narzędziach deweloperskich go nie znajduje.