How to make a Switch item accept lower-case on/off

I am trying to use setup an IFTTT applet for Google Assistant using the “Say a phrase with a text ingredient” and of course getting an error on openHAB saying "Received invalid command ‘off ’ for item "BedroomLights’ because it is sending the ingredient as “off” instead of “OFF” that openHAB needs. So how do I make openHAB accept lower-case off/on or even the other way, make IFTTT send it as UPPER-CASE.


1 Like

The better approach would be to make IFTTT send it uppercase if possible, but if not, you could create a String item and a rule, and send the command to the String item:


String MySwitchString
Switch MySwitch


rule UpperCaseSwitchCommand
  Item MySwitchString received command

There might be a more concise solution.

Thanks for the reply, so far no luck finding a way in IFTTT to send as upper-case.

Same issue…

Any idea why transforms don’t just work here?

Same for me, it would be nice if myopenhab accepted both lowercase and uppercase.