kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.97k stars 232 forks source link

'Attribute' has to used with `state_map`s #782

Closed Tamas-Toth-ebola closed 2 years ago

Tamas-Toth-ebola commented 2 years ago

Hi!

In the hot-fresh MGC 0.11.0 I got a bit frustrating (bug like) working method with the new attribute feature, which I don't know that was really planned such way?!

If I want to use entity attribute instead of state, I have to use state_map to get working result.

Originally could not get proper results: https://community.home-assistant.io/t/lovelace-mini-graph-card/71385/2035

But later with state_map at least I could: https://community.home-assistant.io/t/lovelace-mini-graph-card/71385/2036

Is it really how the function should work?

Thanks for your answer in advance!

Tamas-Toth-ebola commented 2 years ago

We discuss it at HA - Community and seems the problem was because the non numerical values: https://community.home-assistant.io/t/lovelace-mini-graph-card/71385/2040

Could you confirm it? Am I right that in case as a logical conclusion there is no need to fix anything?

In theory the solution could works with not predefined _(state_mapped)_ values, but only in case if the card could build an array from the incoming values, therefore could handle all 'new' values compared to it's array. This is far from trivial but in theory could be done.

But as the HA - Community discussion tells seesm the behaviour is the same with both states and attributes.

Any opinion on it?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!