- Platform information:
- openHAB version: 3.4.1
when
Time cron "*/60 * * * * ?"
then
if (Nest_Away.state == "HOME") {
val String statePlug3 = executeCommandLine(Duration.ofSeconds(5), "bash", "/etc/openhab/scripts/ecoplugs/scripts/Ecoplug3_STATE.sh");
EcoPlug_3_Switch.postUpdate(statePlug3)
}
end
This rule used to work in OH2.4.
However in OH3
I get this error now.
2023-01-27 13:51:01.371 [WARN ] [b.core.model.script.actions.BusEvent] - Cannot convert 'ON' to a state type which item 'EcoPlug_3_Switch' accepts: [OnOffType, UnDefType].
The script gets a state of “ON” or “OFF”
I haven’t been able to find the solution to properly convert the string to the correct switch type