Disable switch in sitemap

Is it possible to disable a switch in a sitemap?

I want the switch to be a normal switch.
But as it is a critical poweroutlet I want to prevent to acidentaly turn it off.

The switch should be displayed a every other switch, but it should be not-clickable.

Is that possible?

I think a work around would be to use define the item as Text in the sitemap.

There is not option to solve your problem directly. Bute you could create a proxy switch, that reflects the state auf you important switch, but does not react on any aktiones. Additionaly you have the option to hide another switch that enables the funktion of your importat switch.

For details Proxy Switches see: Design Pattern Proxy Item

Thomas

The workaround is as close as you can get. The problem will be getting that switch icon in the right hand column. That icon only appears for active elements (e.g. Switches). Text elements do not have an icon in that column. I know of no way to put the icon there and have it not be clickable.

To elaborate on @Dibbler42’s answer, you would create an Unbound Switch Item (i.e. an Item not bound to a binding nor linked to a channel). Put that Item on your sitemap as a Switch. It will still be clickable but you can then have a rule that triggers when the Unbound Item receives a command and set it back to whatever state the “real” outlet is Switch Item is. Kind of like a sitemap version of The Worlds Most Useless Machine.

1 Like

I think your idea to define the switch item as Text is a good-enough workaround for me. :thumbsup:

But I am thinking about making a feature request.
Maybe there could be a new parameter like readonly=true/false

12 Likes