Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. cvbkf

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Groups 0

    cvbkf

    @cvbkf

    0
    Reputation
    12
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    cvbkf Follow

    Latest posts made by cvbkf

    • Objekte in eine Liste/Array um Redundanz zu sparen

      Hallo,

      gibt es eine Möglichkeit mit Blockly eine Liste aus Objekten zu erstellen, um so Blockly-Skripte unabhängig z.B. der Anzahl von Sensoren schreiben zu können?

      Beispiel: Angenommen, ich habe zwanzig Temperatur/Luftfeuchtesensoren und möchte mir z.B. eine Übersicht der Temperaturen aller Sensoren ausgeben lassen. So wie ich das momentan sehe, muss ich das statisch in Blockly machen, also jeden Wert einzeln in das Skript setzen. Wenn später noch einmal zehn Sensoren dazukommen, muss das Skript auch wieder angepasst werden.

      Ist so etwas wie dieser Pseudocode in Blockly überhaupt möglich ?

      Array alleSensoren = holeAlleSensorWerte("shelly");

      $i = 0;
      while ($i < sizeOf(alleSensoren)) {
      echo "Sensor" . + alleSensoren[$i]["name"] + " Messwert: " + alleSensoren[$i]["value"];
      $i++
      }

      posted in Blockly
      C
      cvbkf
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo