@Alexa_Dot
To query the state of an item you need to use: myItem.state
There is no need to use ; at the end off code line EXCEPT after return
(return exits the rule without further ado)
Try this:
The first line checks if Beacon_RSSI is valid and if not exits the rule
rule “Check phone distance with RSSI”
when
Item Beacon_RSSI changed
then
if (Beacon_RSSI.state == UNDEF || Beacon_RSSI.state == NULL) return; //Do nothing
if (Beacon_RSSI.state > -30.0) {
TP_Switch.sendCommand(ON);
}
end
Not much. A lot has been added.
OH1 rules should work out of the box in OH2 apart from the case above
There maybe other breaking changes but none that I can remember of, right now.
It’s a VERY long time I have use OH1