Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst] Raum aus Aufzählung übernehmen

    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

    [gelöst] Raum aus Aufzählung übernehmen

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

      @spitfire4all sagte: Raum eines Objektes in Blockly übernehmen.

      Siehe hier.

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

        @paul53
        Hm finde nicht Funktion mit ID nicht:

        de62284d-3396-4ded-85b7-49b26740f6c5-image.png

        Gruß
        HDM

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

          @spitfire4all sagte: finde nicht Funktion mit ID nicht

          Blockly_temp.JPG

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

            @paul53

            Eine Idee, warum da bei mir 0 herauskommt?

            e53c0787-855b-405a-9035-e420b9ffd983-image.png

            225edd5a-d526-4566-b933-d5f4b800d6a2-image.png

            Ansonsten schon einmal vielen Dank.

            Gruß
            Hans-Dieter

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

              @spitfire4all sagte: Idee, warum da bei mir 0 herauskommt?

              Du hast auch in der Javascript-Funktion ID groß geschrieben?

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

                @paul53
                OK ich nehme scheinbar auch jedes Fett Näpfchen mit.

                Geht aber trotzdem nicht.
                Weiss nicht, ob es was damit zu tun hat, dass Objekt das gar nicht beinhaltet.

                e9f45c19-05ca-415f-bf13-befeda3d3093-image.png

                Gruß
                HDM

                Homoran paul53 2 Replies Last reply Reply Quote 0
                • Homoran
                  Homoran Global Moderator Administrators @Spitfire4all last edited by

                  @spitfire4all sagte in Raum aus Aufzählung übernehmen:

                  OK ich nehme scheinbar auch jedes Fett Näpfchen mit.

                  und warum zeigst du nicht was du da getippt hast?

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

                    @spitfire4all sagte: Objekt das gar nicht beinhaltet.

                    Dann versuche es mal mit Kanal ID anstelle von Objekt ID.

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

                      @paul53

                      Sorry, leider auch nicht.
                      Scheinbar taucht der Wert Raum nirgends auf.

                      28144076-f64c-4e0d-a6da-f2f665526a81-image.png

                      Gruß
                      HDM

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

                        @spitfire4all sagte: leider auch nicht.

                        Poste bitte den Inhalt der Javascript-Funktion in Code tags.

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

                          @paul53

                          var id;
                          
                          // Beschreibe diese Funktion …
                          async function romName(id) {
                              return 0;
                          }
                          
                          
                          on({ id: [].concat(['deconz.0.Lights.10.on']), change: 'ne' }, async (obj) => {
                            let value = obj.state.val;
                            let oldValue = obj.oldState.val;
                            console.warn((await romName(obj.id)));
                            console.warn(obj.channelId);
                          });
                          
                          paul53 1 Reply Last reply Reply Quote 0
                          • paul53
                            paul53 @Spitfire4all last edited by paul53

                            @spitfire4all
                            Die Funktion romName(id) enthält nur

                            return 0;
                            

                            Gehe auf die 3 Punkte rechts und trage die richtige Javascript-Funktion ein:

                            const room = getObject(id, 'rooms').enumNames[0];
                            if(typeof room == 'object') return room.de;
                            return room;
                            
                            S 1 Reply Last reply Reply Quote 0
                            • S
                              Spitfire4all @paul53 last edited by

                              @paul53

                              OK, das funktioniert.
                              Danke das du solchen dummis wie mir weiter hilfst.
                              Hab halt noch nie Funktionen benutzt und versuche mich an anderen Dingen außer Licht an, Licht aus.

                              Gruß und 1000 Dank.

                              HDM

                              Homoran 1 Reply Last reply Reply Quote 0
                              • Homoran
                                Homoran Global Moderator Administrators @Spitfire4all last edited by

                                @spitfire4all sagte in [gelöst] Raum aus Aufzählung übernehmen:

                                Hab halt noch nie Funktionen benutzt

                                umso wichtiger ist es immer alles zu zeigen!
                                https://forum.iobroker.net/topic/51555/hinweise-für-gute-forenbeiträge/1

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

                                Support us

                                ioBroker
                                Community Adapters
                                Donate

                                931
                                Online

                                31.9k
                                Users

                                80.3k
                                Topics

                                1.3m
                                Posts

                                3
                                15
                                461
                                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