Skip to content

How to read out attributes of sensor.ev6_daily_driving_stats #781

Answered by MichT368
MichT368 asked this question in Q&A
Discussion options

You must be logged in to vote

Finally figured out how to get data out for a apex-chart card (https://github.com/RomRider/apexcharts-card)

This card shows all data of 'total_consumed' in the attributes of sensor.ev6_daily_driving_stats in lovelace apexcharts-card:

type: custom:apexcharts-card
apex_config:
  chart:
    height: 500px
graph_span: 28d
span:
  end: day
show:
  last_updated: true
header:
  show: true
  show_states: false
  colorize_states: true
  title: EV6 Gesamtverbrauch (Wh)
series:
  - entity: sensor.ev6_daily_driving_stats
    type: column
    data_generator: |
      return Object.entries(entity.attributes).map(([date, stats]) => {
        return { x: new Date(date), y: stats.total_consumed };
      });…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@mztiq
Comment options

@MichT368
Comment options

@briadelour
Comment options

Answer selected by MichT368
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants