rule “iVolume"
when
Item iVolume received command
then
val PercentType iVolume = receivedCommand as PercentType
executeCommandLine(”/Users/m/Desktop/i.sh vol" + iTunesVolume.state as PercentType)
end
rule "iVolume"
when
Item iVolume received command
then
if (iVolume.state instanceof PercentType)
executeCommandLine("/Users/m/Desktop/i.sh vol" + iVolume.state as PercentType)
end
or
rule "iVolume"
when
Item iVolume received command
then
if (receivedCommand instanceof PercentType)
executeCommandLine("/Users/m/Desktop/i.sh vol" + (receivedCommand as PercentType))
end
Maybe DecimalType will work better.
I silently corrected the iTunesVolume.state to iVolume.state