Plant monitor component displays wrong icon color

The Plant monitor component is very useful to display problems in Lovelace. But it often displays weird icon colors. In some cases, the icon is the same color as the background (white in my case). I can tell the icon is being rendered, but it is very hard to distinguish since it is the same color as BG. Not a huge issue, but it annoys me. Anyone experiencing same issue?

It has to do with the fact that the Plant entity has a “brightness” attribute. The front-end treats it like a light and adjusts the brightness of the plant icon to match the value of the attribute. A bit like when the light icon is yellow if on and blue if off. With a dimmable light, brightness is a relative value between 255 (full on) and 0 (full off). Whereas the brightness value of the plant sensor is absolute lux and can be a very, very high number e.g. 5,000+.

So the plant icon gets set to over a 1000% brightness by the ui and ends up washed out. Link to the code here.

A quick search through the source code of the back-end component looks like the plant component is the only one using “brightness” in this way. Might be worth considering changing the attribute name to “illuminance”?

@ChristianKuehnel , tagging the component author for visibility.

Makes sense!! Thanks for the prompt reply. Yes, changing the attribute name would address it. Illuminance, Light, etc. Like I mentioned, not a huge deal, just messes with my mild OCD

@ChristianKuehnel

Any chance the name of the light attribute can be changed?

I cannot be the only one with this frustration.

Best regards

Yes sure. Just create a PR for it. It should be only one variable when returning the duct.

1 Like