rule therm_manual_auto
when
Item Therm_Manual changed to AUTO
then
logInfo("Therm_Manual", "Set Therm_Mode to " + Therm_Target.state)
sendCommand(Therm_Mode, Therm_Target.state)
end
The last line is highlighted as an error in the designer.
I don’t know why and I honestly don’t know if it is just a Designer problem or if OH would actually have a problem with that line as well.
The root of the problem is that for what ever reason Designer can’t tell that OnOffType can be converted to a String like any other object.
Little errors like these is why I always recommend using the method on the Item rather than the sendCommand and postUpdate actions.
I fund that when you do use the actions, it is always best to call toString explicitly every time.
Now, the fact that you are seeing the same error when using the method is another thing entirely for which I have no explanation. I routinely make exactly that call with stitches with no errors.