Closed loeffelpan closed 2 years ago
That's a hard no. A toggle is clickable and should do something when you click it.
Accepted. But if entity is e.g. a binary-sensor toggle would work, too. And toggle is a wonderful way to just show binary states.
binary-sensor
What do you expect when toggling a binary_sensor
entity?
It's state is set either by its integration or by some template (if it is a template sensor), it cannot be just toggled manually.
Sorry for being unclear. Nothing would happen when toggling a binary_sensor
.
But the option toggle: true
can render it and shows the state in a beautiful way. It can render any entity with binary states, unless toggling them make sense or not. So my intention was "why not rendering the state:
as toggle?" just for showing the state.
In the end I probably would use restriction-card
to protect those toggles from useless toggling.
I see your point, but I believe firmly in the Principle of Least Astonishment, and a toggle that doesn't do anything does not fall under that.
I'm fine with your decision. Thanks. To be consequent binary sensors shouldn't be redendered as toggle, but maybe it is not easy to avoid.
I have a attribute of an entity I would like torender as a toggle. For now I use this, but
toggle: true
seem to work just for an entity not for astate:
template. Maybe you can add this for template rendering to true/false or on/off. Would avoid a couple of binary_sensors for me.