Open ildar170975 opened 2 years ago
Here is a full list of device_classes with wrong icons (for others - icons are right):
atmospheric_pressure aqi carbon_dioxide carbon_monoxide current energy gas monetary nitrogen_dioxide nitrogen_monoxide nitrous_oxide ozone pm1 pm25 pm10 power_factor sulphur_dioxide volatile_organic_compounds voltage
Update: in fact, only a few classes have hard-coded icons in mini-graph-card, other classes will have a default “eye” icon. Since number of classes in HA is a matter of change - please take into account that the list above may become not full.
Probably related to https://github.com/kalkih/mini-graph-card/issues/155
Is it required to hardcode icons for device_classes? https://github.com/kalkih/mini-graph-card/commit/853f966b2074283af65be9bc7489b08512f38b92 Isn't it possible to "import" icons from somewhere? I think that default icons for device_classes are supposed to be used (and probably "imported") everywhere - in stock cards, in custom cards.
I think that default icons for device_classes are supposed to be used (and probably "imported") everywhere - in stock cards, in custom cards.
I would assume the same, sadly enough this doesn't seem to be the case.
However, there is an active community effort called custom-card-helpers that we should consider using -- will investigate for next release; as they also provided a conversion for the weird locale format (would properly resolve #702 instead of requiring a custom locale prop)
At least for these device_class sensors a wrong icon is displayed:
Below there are
more-info
windows with right icons &mini-graph-card
with wrong icons: