Navigation

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

    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

    State blockieren

    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sharky-os last edited by

      Hallo,

      ist es möglich einen State (true/false) per Script zu blockieren.

      Hintergrund: Wenn ich per Yahka einen z.B. Sonoff schalte und dieser gerade offline sein sollte, sehe ich das nicht sofort und denke das Gerät wurde geschaltet. Also würde ich ein Blockly erstellen, das dann den State blockiert, sobald "Alive" des Gerätes auf false steht.

      Gruß Marco

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

        na klar.. wird so gesehen nicht blockiert sondern wird nicht geschaltet

        1 Reply Last reply Reply Quote 0
        • S
          sharky-os last edited by

          Kannst Du mir mit einem Beispiel auf die Sprünge helfen?

          Gruß Marco

          1 Reply Last reply Reply Quote 0
          • htrecksler
            htrecksler Forum Testing last edited by

            So gesehen kannst du einen State nicht blockieren.

            Du kannst lediglich innerhalb eines scriptes das Setzen des State abhängig von einer Bedingung machen.

            aber dann muss der Ganze Prozess innerhalb des scriptes ablaufen. Ich hoffe Du verstehst was ich damit sagen will.

            1 Reply Last reply Reply Quote 0
            • htrecksler
              htrecksler Forum Testing last edited by

              in etwa so…

              on({id: "DEINTRIGGER"}, function(obj) {
                  gAlive = getState("DEINSTATEALIVE");
                  setTimeout(function () {
                      if (gAlive.val) {
                          ...irgendwas schalten;
                      }
                  }, 100);
              });
              
              

              so in etwa…

              1 Reply Last reply Reply Quote 0
              • S
                sharky-os last edited by

                Sorry für die späte Antwort, war lange nicht hier. Vielen Dank, werde es mal so versuchen.

                Gruß Marco

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

                Support us

                ioBroker
                Community Adapters
                Donate

                888
                Online

                31.8k
                Users

                79.9k
                Topics

                1.3m
                Posts

                3
                6
                373
                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