Mini-graph-card: Empty graph with entities without history states

Created on 16 May 2019  路  1Comment  路  Source: kalkih/mini-graph-card

Describe the bug
Empty graph with entities without state history. A similar problem #41.

To Reproduce
Steps to reproduce the behavior:

  1. Stop update entity state, exp., sensor.voltage1 by mqtt publish
  2. Exclude entity in component recorder
  3. Only in test hass! Clear entity history states. Call service recorder.purge with data {"keep_days": 0, "repack": true}.
  4. Restart hass
  5. Set state for entity, exp. for voltage = 12.3
  6. Add mini-graph-card on view
type: custom:mini-graph-card
show:
  graph: bar
  labels: true
entities:
  - entity: sensor.volatge1
  - entity: sensor.volatge2
  - entity: sensor.volatge3
  1. See empty graph

Expected behavior
Graph card show bars current entities state.

Screenshots
1
2

Home Assistant
Version: 0.93
Tested: 0.92.2

mini-graph-card
Version: v0.3.3

Additional context
I exclude domain sensor and include entities those that are needed off history. Because i have a lot sensors and i want to see only current value.

bug enhancement

Most helpful comment

Hey,
Thanks for the extensive report!
The graph is completely based on the entity history and will therefore not work without history data, (history data also includes the latest/current state), so this is kind of expected behaviour

Could possibly add a fallback to use the current state if no history is available.

Also, check out the bar-card, could possibly be used in place of this card for your use case
https://github.com/custom-cards/bar-card

>All comments

Hey,
Thanks for the extensive report!
The graph is completely based on the entity history and will therefore not work without history data, (history data also includes the latest/current state), so this is kind of expected behaviour

Could possibly add a fallback to use the current state if no history is available.

Also, check out the bar-card, could possibly be used in place of this card for your use case
https://github.com/custom-cards/bar-card

Was this page helpful?
0 / 5 - 0 ratings

Related issues

QkulleQ picture QkulleQ  路  7Comments

clydefrog76 picture clydefrog76  路  6Comments

yadenisenko picture yadenisenko  路  4Comments

xstrex picture xstrex  路  7Comments

gerard33 picture gerard33  路  3Comments