Show state of a device (switch in this case) in Lovelace, but view only, without the possibility to toggle the switch.
As I’m building a full HA operated hot tub, I want everyone in the household to see, what the machinery is doing, but not being able to change the states. They will only get two control buttons, Tub On and Tub Off.
This is mandatory, as there are combinations of states, which could case damage, if not operated by authorized user (me).
Like, pushing the heater on, when circulation pump of water is off is really an unwanted combi.
There will be an automated flow, which sets the states of the switches it self to start and stop the tub in the right order.
So it is really important, that there will be VIEW ONLY icons on that Lovelace card.
I was tonight also diving into the binary sensors. Will need to study a bit longer, before i get exactly, how it works. But it will do, what I want, thats already clear
Alternatively use a conditional card with a different icon…
This one has two buttons with different icons but only one of them displays at any one time, dependent on the state of the entity. Combine it with the tap/hold no action above and you’ll be sorted.