I’m going to guess you have a missing closing ) or ] or } somewhere further up in the file. There is a mismatch in the parens in that if statement making it try to use one of the .state s as the boolean.
There is nothing about the statement itself that looks wrong.
Thanks for your very quick feedback.
With your remarks I check the code again and I couldn’t find a issue.
I closed all the files and restarted WinSCP and no error was shown.
One line left of a converted rule I can’t find a solution for
Infinity is held in the works "not working’. Not working how? Errors in the log?
That’s just a meaningless line. You shouldn’t have ever seen any working examples with something like that. A String Item’s state is a StringType, not a String. You can’t just say “as” and convert types that are not related to each other. Usually you will see a call to toString to convert a State to a String.
Again, this line is kind of nonsense. A String Item isn’t a String. A String Item isn’t even a State. A String Item carries a state. A state can be posted as an update to an Item. But an Item cannot. But you should be able to send Radio2.state as an update.
If these were ever lines in a rule you are converting, that rule has never worked. If a lot of these sorts of things trip you up, consider looking at Blockly which makes you avoid a lot of these sorts of problems.