Mini-graph-card: Inverting graph

Created on 22 Aug 2020  路  2Comments  路  Source: kalkih/mini-graph-card

Hi!

Would it be possible to add an option to invert the graphs?
I am using the card to visualize air quality from this integration (https://www.home-assistant.io/integrations/waqi/).
It returns values on the AQI scale, where 0 is best air quality and 300+ is hazardous. It would be nice to let the graph represent the quality, instead of the particulate matter measuerment it returns.

question

All 2 comments

Hi!

Would it be possible to add an option to invert the graphs?
I am using the card to visualize air quality from this integration (https://www.home-assistant.io/integrations/waqi/).
It returns values on the AQI scale, where 0 is best air quality and 300+ is hazardous. It would be nice to let the graph represent the quality, instead of the particulate matter measuerment it returns.

For this I would suggest feeding that value in a template sensor and later give _that_ template sensor to the graph. You can then tweak the value in percentage or whatever you want and use it globally.

Alternatively, if you just want to graph it inside this widget and nothing more, you can try with the upper_bounds and lower_bounds properties. Set the upper_bounds to 0 and lower_bounds to 300. To make it even more appealing, set color_thresholds too.

Let me know!

Great suggestions!
Give it a shot and see if that does the trick.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

clydefrog76 picture clydefrog76  路  6Comments

tomlut picture tomlut  路  4Comments

NapalmCandy picture NapalmCandy  路  4Comments

WhistleMaster picture WhistleMaster  路  3Comments

pejotigrek picture pejotigrek  路  6Comments