Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
houser42 opened this issue Jul 14, 2023 · 1 comment
Open

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

houser42 opened this issue Jul 14, 2023 · 1 comment

Comments

@houser42
Copy link

houser42 commented Jul 14, 2023

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
Copy link
Author

houser42 commented Jan 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant