Show state of a switch

I’m trying the create a Entity Card, that shows the state of a switch without the option to change the state. I don’t want anyone turning the washer off while it’s working.

Something like the last line:

  - entity: switch.shelly_xxxx
    name: Washer
    icon: mdi:power
    state_color: true
    secondary_info: last-changed

I’m not aware of a display option to remove it, but you could create a template sensor that displays the state:

1 Like

The template sensor is a good idea, the other option is to lock the switch with the Lovelace restriction card.

1 Like

you can also just add a confirmation to the box

  action: toggle
  confirmation: true

It’ll pop up a confirmation box everytime you want to turn on or off the switch

1 Like