lblabr
(Lars Bretschneider)
1
is it possibble to convert the return value of regex to another ?
i have: "<[http://10.100.10.39/MAINZONE/d_mainzone.asp:500:REGEX(.INPUT type=‘hidden’ name=‘checkMmute’ value=’([ofn])’.*)]
it returns on|off for an switch item, it hink in need ON|OFF can this be easliy coverted ?
thanks in advance
H102
(CM6.5 H102)
2
Try using the MAP transformation to convert on/off to ON/OFF either in the item file, sitemap, or create a proxy item.
vzorglub
(Vincent Regaud)
3
Not really, not directly
By that I mean that you can "nest transformation…
So you need another item.
a new item:
Switch mySwitch
A rule:
rule "convert Switch string to state"
when
myHttpItem changed
then
mySwitch.postUpdate(myHttpItem.state.toString.toUpperCase())
end