sensor.greenely icon indicating copy to clipboard operation
sensor.greenely copied to clipboard

Are the config examples for custom:apexcharts-card up to date?

Open houser42 opened this issue 2 years ago • 1 comments

Hello, Just checking if the config examples for custom:apexcharts-card are up to date? Unable to get it working so far although I have both the sensors from this code and the apexcharts all working on their own. I get an error when trying to test the example config to get going: "No card type configured".

Any chance of a comment or a check? Many thanks.

Below is the code from your example git below that I am using in a manual card.

- type: custom:apexcharts-card
  header:
    title: Förbrukning/timme & elpris
    show: true
  graph_span: 24h
  span:
    start: day
    offset: '-1d'
  yaxis:
    - id: first
      apex_config:
        tickAmount: 10
      min: 0
      max: 2
    - id: second
      opposite: true
      apex_config:
        tickAmount: 5
      min: 0
      decimals: 0
  apex_config:
    dataLabels:
      enabled: false
    stroke:
      width: 4
  series:
    - entity: sensor.greenely_hourly_usage
      name: Förbrukning
      yaxis_id: first
      type: column
      color: red
      show:
        legend_value: false
      data_generator: |
        return entity.attributes.data.map((entry) => {
          return [new Date(entry.localtime), entry.usage];
        }); 
    - entity: sensor.greenely_prices
      data_generator: |
          return entity.attributes.previous_day.map((entry) => {
            return [new Date(entry.date + 'T' + entry.time), entry.price];
          }); 
      yaxis_id: second
      type: line
      color: blue
      name: Elpris
      show:
        legend_value: false

houser42 avatar Jul 14 '23 18:07 houser42

Hello again. Looking at this again, if this add-on is still updated? Would be great with an example code that shows current pricing for two days as usual and also hourly usage up to the present, preferably in apex-charts, but anything that works would do it.

Any chance of an update comment on this? Many thanks.

houser42 avatar Jan 13 '24 13:01 houser42