Thanks.
I also have “read-only” switches (e.g. smoke detectors).
To see them in BasicUI as readonly I used 2 things:
- Used mappings to be able to map ON/OFF state to string
Switch KitchenSmokeDetected "Smoke detected (Kitchen) [MAP(SwitchPresence.map):%s]" <fire> (gEmergencyDetectors,gSmokeDetectors) {channel="mihome:smoke:158d0002b0b1c6:alarm"}
Content of conf/transform/SwitchPresence.map
is
ON=Yes
OFF=No
NULL=Not set
UNDEF=(not defined)
-=?
- Using Text type in sitemap
Text item=KitchenSmokeDetected
And it looks like this:
When you use the Group widget for display in sitemap, you are stuck with default displays for everything. No mappings, visibility, colour options; no choice of item ordering.
It’s a quick fix to get you started and most people soon abandon the use - for display
It often seems little understood that you can get the same “one line” display that is clickable to expand to a new page sub-items like this:
Text item=myGroup {
Switch item=switchA mappings=[ON="fred",OFF="mary"]
Text item=switchB icon="bell"
}
More tedious (once), more flexible, more precise.
I’m at a very early stage in what concerns OH use, my first goal is to have everything working, so for the time being I will continue with group display, but soon I will optimize and your suggestion will be very usefull.