After more searching I’ve found that I can use Thing trigger in a rule. I can use it to send status to an Item. Still be nice if there is an option to send status directly to an item and not via rule (I assume that this depends on the binding as @vzorglub wrote).
I have successfully implemented a rule where I can get a proxy switch to trigger based on the thing status. My challenge is I want the LIFX color item to be set to OFF when the thing is detected as OFFLINE. Seems when it is OFFLINE, sending it a command or update results in an error
yes but its really the same result as the IOS GUI - color item is not responsive and cant be turned off when device is offline
rule "lifx Jackson online"
when
Thing "lifx:colorlight:D073D5203016" changed
then
var thingStatusInfo = getThingStatusInfo("lifx:colorlight:D073D5203016")
if ((thingStatusInfo !== null) && (thingStatusInfo.getStatus().toString() == "ONLINE")) {
Lifx_JC_Online.postUpdate(ON)
} else {
Lifx_JC_Online.postUpdate(OFF)
Lifx_JC.sendCommand(OFF)
}
end
You can turn the item off. But not the light itself of course, because it is offline. OH can’t reach it.
Your code makes sense, it’s just that Lifx_JC.sendCommand(OFF) will never work if the thing if offline.
Lifx_JC.postUpdate(OFF)
Will turn off the item in OH. But not the light itself.