Is it possible to have a String item that can store various Strings, and these are selectible on the sitemap by scrolling up and down like the step function of a setpoint?
I want to have a string that has, on/off/auto/1hourOverride, that kind of thing and tap up or down to select the appropriate one. Then pick this up in a rule as a ‘received update’ then choose what to do. I see it as an option to take various options that similarly affect one system. If this was for the heating for example, thats pretty much all the options I would want in one place.
If thats not possible, maybe have a setpoint of 1-4, then turn the output to text with a transform?
rule "Select Radio Station"
when
Item Radio_Station received command
then
switch(receivedCommand) {
case 0 : playStream(null)
case 1 : playStream("http://metafiles.gl-systemhaus.de/hr/hr3_2.m3u")
case 2 : playStream("http://mp3-live.swr3.de/swr3_m.m3u")
case 3 : playStream("http://edge.live.mp3.mdn.newmedia.nacamar.net/radioffh/livestream.mp3.m3u")
case 4 : playStream("http://stream.laut.fm/club93")
}
end