Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. Gewerke mit JavaScript auflisten

    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

    Gewerke mit JavaScript auflisten

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

      Hallo,

      ich bin neu in IOBroker scripten und wollte einfach mal wissen, wie ich mir per JavaScript die Gewerke auflisten lassen kann.

      Mit TCL bekomme ich es hin mit JS nicht.
      TCL script:

      string index;
      string liste = dom.GetObject(ID_FUNCTIONS).EnumUsedNames();
      foreach (index, liste) {
      Write(index #"\n");
      }
      

      Ergebnis:
      Fenster
      funcButton
      funcCentral
      funcClimateControl
      funcEnergy
      funcEnvironment
      Licht
      Rollladen
      Sicherheit
      Tür
      Verschluss1
      Wetter

      Geht es vielleicht auch mit Blockly?

      Vielen Dank

      Grüße
      Ben

      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @ben1984 last edited by

        @ben1984
        Funktion getEnums('functions'). Beispiel:

        const gewerke = getEnums('functions');
        for(let i = 0; i < gewerke.length; i++) {
            log(gewerke[i].id);
        }
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Support us

        ioBroker
        Community Adapters
        Donate

        839
        Online

        31.8k
        Users

        80.0k
        Topics

        1.3m
        Posts

        javascript
        2
        2
        272
        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