Make sensor „look“ like a light

Hello,
I have figured out that a binary_sensor can be displayed as light. Meaning also that the color of the icon changes in an entities card when light is on.
I use this a lot for lights that are fully automatic controlled.

Sadly I did not figure out how to do this with sensor that reads 0-100% I have also some of them for dimmable lights that are only automatic controlled.

Can you help me make them color change as the default dimmable lights icon does?

Also thought about „legacy“ template sensor but device_class lights seems to be not supported there
Should work for light and dark theme.

Thanks

Did you check template light?

Thanks for the reply.

Can I make this a read only light?
And how would I then display the percentage on a entities card?

There is a filled called level template, wire it to your brightness sensor.

And if you do set turn on and turn off actions to something not existing, it will just show the state without modifying the state.

Sadly, that is also not exactly what i wanted… now i create a template called Treppe and this is the result in my entities card

I can not find a way of “ignoring” the toggle and display percentage instead

Basically I want the first row, with the icon of the second

Is there a reason just changing the icon to a lightbulb doesn’t work?

If I do so, the color still does not change with the value