Although all items are persisted after a restart of OH none of the three buttons is highlighted anymore. Since I need to restart OH every once in while I need to go through all the buttons and click the appropriate ones which reflect the value of the number items. Is there any trick to get the buttons highlighted automatically ?
Thank you for the hint. However, I would need to rewrite a bunch of rules. So I’ll try a rule like this:
rule "set switches correctly"
when
System started
then
var int i=0
i=(szSzene.state as Number).intValue
szSzene.sendCommand(i)
i=(szTorModus.state as Number).intValue
szTorModus.sendCommand(i)
i=(X4000_Favourite.state as Number).intValue
X4000_Favourite.sendCommand(i)
i=(A3311_Favourite.state as Number).intValue
A3311_Favourite.sendCommand(i)
end