Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. If then

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    If then

    This topic has been deleted. Only users with topic management privileges can see it.
    • Volker123
      Volker123 last edited by

      Hallo,

      kennt sich jemand mit if then aus?

      Hier wird immer OK ausgegeben. Egal ob zustand true oder false ist. Muss man hier vielleicht mit equals arbeiten?

      zustand = getState("shelly.0.SHSW-21#1346AC#1.Relay1.Switch"/Switch/).val;

      console.log(zustand);

      if (zustand="true"){

      console.log("ok");

      }

      else{

      console.log("nicht");

      }

      1 Reply Last reply Reply Quote 0
      • jedo
        jedo last edited by

        if (zustand===true){
        
        1 Reply Last reply Reply Quote 0
        • Volker123
          Volker123 last edited by

          Hallo Jens,

          vielen Dank.

          Volker

          1 Reply Last reply Reply Quote 0
          • cash
            cash Most Active last edited by

            Oder einfach if(zustand){

            Oder if(!zustand){

            Wenn man auf false abfragen will

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            Support us

            ioBroker
            Community Adapters
            Donate

            801
            Online

            31.8k
            Users

            79.9k
            Topics

            1.3m
            Posts

            3
            4
            324
            Loading More Posts
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes
            Reply
            • Reply as topic
            Log in to reply
            Community
            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
            The ioBroker Community 2014-2023
            logo