wassini
(Lars Bo Wassini)
July 7, 2021, 10:16am
1
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
toggle:false
I’m not aware of a display option to remove it, but you could create a template sensor that displays the state:
1 Like
tom_l
July 7, 2021, 10:51am
3
The template sensor is a good idea, the other option is to lock the switch with the Lovelace restriction card.
Restriction Card
A card to provide restrictions on Lovelace cards defined within.
Disclaimer
This card is not to be used as a means to truly protect an instance. Someone with the means and knowledge will be able to bypass the restrictions presented by this card should they choose to.
Options
Name
Type
Requirement
Description
type
string
Required
custom:restriction-card
card
map
Required
Card to render within restriction-card.
restrictions
map
Optional
Additional restrictions. See…
1 Like
petro
(Petro)
July 7, 2021, 11:38am
4
you can also just add a confirmation to the box
tap_action:
action: toggle
confirmation: true
It’ll pop up a confirmation box everytime you want to turn on or off the switch
1 Like