This rule just doesent work it makes all my rules stop working…
rule "PCSTATE1"
when
Item PCSTATE1 changed to ON
then if (PCSTATE.state == "Online") {
createTimer(now.plusSeconds(5)) [
if (PCSTATE.state == "Online") {
PC.sendCommand(ON)}]
createTimer(now.plusSeconds(2)) [
PCSTATE2.sendCommand(0N)]}
else if (PCSTATE.state == "Offline") {
createTimer(now.plusSeconds(5)) [
if (PCSTATE.state =="Offline") {
PCSTATE4.sendCommand(ON)}]}
end
But when i remove the second timer on the rule it works but i need that second timer.
rule "PCSTATE1"
when
Item PCSTATE1 changed to ON
then if (PCSTATE.state == "Online") {
createTimer(now.plusSeconds(5)) [
if (PCSTATE.state == "Online") {
PC.sendCommand(ON)}]}
else if (PCSTATE.state == "Offline") {
createTimer(now.plusSeconds(5)) [
if (PCSTATE.state =="Offline") {
PCSTATE4.sendCommand(ON)}]}
end
I am doing something wrong but i dont know how to make it work damit.