rule "WigaTemp_35"
 when
  Item WigaTopTemp changed
 then
        WigaTopTempNumber.postUpdate(Float::parseFloat(WigaTopTemp.state.toString))
        //logInfo("Your command exec", "Akt Wiga Top "+WigaTopTemp.toString)
        if (Double::parseDouble(WigaTopTemp.state.toString) > 35.0){
           logInfo("Your command exec", "WigaTopTemp > 35")
           if (WigaR1.state==ON){
               logInfo("Your command exec", " WigaR1 in ON->>OFF")
               sendCommand(WigaR1,OFF)
           }
            if (WigaR2.state==ON){
               logInfo("Your command exec ", " WigaR2 in ON->>OFF")
               sendCommand(WigaR2,OFF)
           }
            if (WigaR4.state==ON){
               logInfo("Your command exec", "WigaR4 in ON->>OFF")
               sendCommand(WigaR4,OFF)
           }
        }
       if (Double::parseDouble(WigaTopTemp.state.toString) < 25.0){
           logInfo("Your command exec", "WigaTopTemp < 30")
           if (WigaR1.state==OFF){
               logInfo("Your command exec", " WigaR1 in OFF->>ON")
               sendCommand(WigaR1,ON)
           }
            if (WigaR2.state==OFF){
               logInfo("Your command exec ", " WigaR2 in OFF->>ON")
               sendCommand(WigaR2,ON)
           }
            if (WigaR4.state==OFF){
               logInfo("Your command exec", " WigaR4 in OF->>ON")
               sendCommand(WigaR4,ON)
           }
        }
end

rule "Call_2"
when
      Item MyCall_Channel changed
then
      logInfo("Your command exec", "Change "+MyCall_Channel.toString)
      if(MyCall_Channel.state as DecimalType == 0){
          logInfo("Your command exec", "Change <0>")
          executeCommandLine("python /etc/openhab2/scripts/jfs1.py aus",1000)
      }
      if(MyCall_Channel.state as DecimalType == 1){
          logInfo("Your command exec", "Change <1>")
          executeCommandLine("python /etc/openhab2/scripts/jfs1.py on1",1000)
      }
      if(MyCall_Channel.state as DecimalType == 2){
          logInfo("Your command exec", "Change <2>")
           executeCommandLine("python /etc/openhab2/scripts/jfs1.py on2",1000)
      }
      if(MyCall_Channel.state as DecimalType == 3){
          logInfo("Your command exec", "Change <3>")
           executeCommandLine("python /etc/openhab2/scripts/jfs1.py on3",1000)
      }
      if(MyCall_Channel.state as DecimalType == 4){
          logInfo("Your command exec", "Change <4>")
           executeCommandLine("python /etc/openhab2/scripts/jfs1.py on4",1000)
      }
end
