Customize input_boolean state

Hi, I can’t find a solution, I have an input_boolean which has the on/off status, when I click on the lovelace it displays the on or off status (glance card).

Is it possible to rename this displayed state and display it in the glance card (must be clickable like a switch/boolean)
Thanks

Not directly, alas. There are ways around it though by using using Template Sensors.

The device_class and state_class properties are especially useful to know when creating HA Sensors.

So should I create a switch that toggles my boolean? I don’t understand well can you give me an example? Thank you

If you check out the Template Sensors page, you can see some examples of how to create such a sensor. You basically take the state of your input_boolean and use some IF conditions to return a value depending on the state.

State based sensor modifying another sensor’s output

There is a way without creating a binary sensor.
But this will work in Entities card, not in Glance card.
Use custom:template-entity-row and display any user-defined states.

For Glance card you may use card-mod and “:after” pseudoclass which may be used to display any string, go to card-mod thread for the solution (here).
image

Ok it works in the Glance card, but unfortunately I realized that I have to use it in the Mushroom entity card, and it doesn’t work

Surely it may not work, this is a diff card, try adapting this method for mushrooms.

I don’t need a sensor that tells me the state and changes the state based on the state of the boolean, but a clickable entity (like a switch) that activates the boolean and shows me a custom state

I’ve tried, but it doesn’t seem to work