Announcement

Collapse
No announcement yet.

What is wrong with this line?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What is wrong with this line?

    Trying to check multiple device conditions using the if / then command. can anyone spot where I am going wrong with this line?
    Code:
    if hs.isoff (1074)and if hs.isoff(1137) and if hs.isoff(1112) and if hs.isoff(1133)and if hs.isoff(1114) and if hs.isoff(1113) and if hs.isoff(1061) then
    Thanks.
    sigpic
    A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

    #2
    Try if (test) and (test) and (test) then
    do something
    Endif
    HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
    BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
    DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:

    Comment


      #3
      I don't think you need all the "and if's. "If Cond1 And Cond2 And Cond3... Then" should work for you.
      Real courage is not securing your Wi-Fi network.

      Comment


        #4
        Originally posted by dmurphy View Post
        Try if (test) and (test) and (test) then
        do something
        Endif
        Hey thanks, that sorted it.
        sigpic
        A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

        Comment


          #5
          Originally posted by Wadenut View Post
          I don't think you need all the "and if's. "If Cond1 And Cond2 And Cond3... Then" should work for you.
          Yip too many if's Thanks
          sigpic
          A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

          Comment

          Working...
          X