I have the following in a sitemap (much simplified)
Frame label=“Boiler Control” {
Text label=“Boiler” icon=“fire” {
Frame {
Switch item=Heating_Enable icon=“fire”
}
}
}
The icon on the switch changes automatically from gray to yellow, however I would like the icon on the Text label to also change (based on the value of Heating_Enable).
I can see how I might do that using visibility but I assume the visibility would have to be on the complete nested frame which would be a maintenance nightmare. I found this [1] but I suspect it has not been implemented. Are there any other options?
OK, that is a shame. I think I will have to drop that idea then. Maybe just change the label colour or something. There is no way of extracting part of a sitemap as a ‘subroutine’ is there? I know about groups but they do not do enough in this instance.
Thanks.
However, if you configure your Items with labels and icons and put them into a Group you can just put the Group on your sitemap instead of making a new Frame. Then you can set up the Group’s icon to change with the state of the Group.
The big drawback here is you cannot customize how the Items appear under the Group. You only get the defaults.
Group:Switch Boiler "Boiler" <fire>
Switch Heating_Enabled "Heating Enabled Label" <fire> (Boiler) {binding}
// On your sitemap put
Group item=Boiler
This so nearly works:
Frame label=“Boiler Control” {
Text label=“Boiler” icon=“fire” item=Heating_Enable {
Frame {
Switch item=Heating_Enable icon=“fire”
}
}
}
That is, putting a (switch) item on the Text element. The icon shows (usually) the correct state when the screen is refreshed, but unfortunately does not update automatically.