Is it possible to disable toggle button for "input_boolean" entity row?

There is an Entities card with an input_boolean entity row:

Is it possible to disable this toggle button?
I mean:

  • the toggle cannot be changed;
  • the toggle’s color is --disabled-text-color (well, this I can do myself with card-mod).

I know about restriction-card but here the toggle must be simply disabled.

If by disable you mean hide it, here’s a cheesy solution:

  - entity: input_boolean.test_boolean
    type: attribute
    attribute: somethingthatdoesntexist

This will display a - instead.

I did not know about this hack))
Also, we can use a card-mod to hide the toggle (display: none).
But I need this toggle to be displayed - and not changeable.

A vanilla solution would be to write a template binary_sensor which will display its state, then you could enable display_state_color as well, I guess that’s not what you’re looking for though.

Yes, this is not what needed, too cumbersome…
But thank you very much for ideas!

1 Like

Spent some time in Code inspector & reading about CSS - found it!