Navigation

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

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    Wochenblock in Blockly

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

      @kusselin sagte: von montags bis freitags um diese Zeit

      Bild_2022-03-13_094720.png

      Kusselin 1 Reply Last reply Reply Quote 1
      • Kusselin
        Kusselin @paul53 last edited by

        @paul53 danke Dir..wie weiss Blockly das Wochentage 5 von montag-freitag ist?

        paul53 Homoran 2 Replies Last reply Reply Quote 0
        • paul53
          paul53 @Kusselin last edited by paul53

          @kusselin sagte: wie weiss Blockly das Wochentage 5 von montag-freitag ist?

          Erzeugter Javascript-Code:

          (new Date().getDay() === 0 ? 7 : new Date().getDay());
          

          getDay()

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

            @paul53 sorry paul..das verstehe ich nicht jetzt..

            Was muss ich da jetzt machen?

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

              @kusselin sagte: das verstehe ich nicht jetzt..

              new Date().getDay() liefert die Werte von 0 - 6 (0 = Sonntag). Blockly macht aus der 0 (für Sonntag) eine 7, so dass <= 5 auf die Werte 1 bis 5, also Montag bis Freitag eingrenzt.

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

                @paul53 ahh ok..wenn ich von montag bis mittwoch wollte dann müsste ich bei Tage „3“ eintragen..richtig?

                Und wie wäre es wenn ich zb montag mittwochs und samstag wollte?

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

                  @kusselin sagte: montag mittwochs und samstag wollte?

                  WT = 1 oder WT = 3 oder WT = 6

                  Kusselin 1 Reply Last reply Reply Quote 1
                  • Kusselin
                    Kusselin @paul53 last edited by Kusselin

                    @paul53 o.k. danke.....

                    ne Frage noch...wie bekomme ich jetzt nochmal den baustein dazu das ich hier den Wochentag mit einfügen / dazu stellen kann das es so aussieht wie bei Dir?

                    Gruss

                    Image 1.png

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

                      @kusselin sagte: dazu stellen kann das es so aussieht wie bei Dir?

                      Block "und" hinzufügen und mit rechter Maustaste über dem Block "externe Eingänge" auswählen.

                      Bild_2022-03-13_124545.png

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

                        @paul53 Danke Dir

                        Image 2.png

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

                          @kusselin sagte in Wochenblock in Blockly:

                          weiss Blockly das Wochentage 5 von montag-freitag ist?

                          @kusselin sagte in Wochenblock in Blockly:

                          wenn ich von montag bis mittwoch wollte dann müsste ich bei Tage „3“ eintragen..r

                          ich befürchte, dass du das Ganze noch nicht ganz verinnerlicht hast.

                          es geht nicht um 5 oder 3, sondern um kleiner gleich 5 oder 3, also 1-5 bzw. 1-3

                          Kusselin 1 Reply Last reply Reply Quote 0
                          • Kusselin
                            Kusselin @Homoran last edited by

                            @homoran ich verstehe das so.....jetzt mit >= 5 ist es so...

                            Montag=1
                            dienstag=2
                            ...
                            ...
                            freitag=5

                            also bimmelt das radio in diesem zeitraum zu der zeit zwischen 05.15. und 08:00 Uhr....

                            Stimmt das nicht?

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

                              @kusselin dann ist das ok!
                              du hattest nur in deinen vorigen Posts den Vergleichsoperator nicht erwähnt.
                              Daher hatte ich die Befürchtung, dass du meintest alleine mit 5 seien alle 5 Tage gemeint

                              Kusselin 1 Reply Last reply Reply Quote 0
                              • Kusselin
                                Kusselin @Homoran last edited by Kusselin

                                @homoran nee halt.. so wie ich’s jetzt oben mit der 5 gepostet habe, geht der Radio nur freitags an richtig?

                                Wen ich’s von Montag-freitag haben will muss ich noch Bausteine 1+2+3+4 dazu nehmen...oder raff ich’s immer noch net...

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

                                  @kusselin sagte: so wie ich’s jetzt oben mit der 5 gepostet habe, geht der Radio nur freitags an richtig?

                                  Nein, >= 5 ergibt freitags, samstags und sonntags.

                                  @kusselin sagte in Wochenblock in Blockly:

                                  Montag-freitag haben will muss ich noch Bausteine 1+2+3+4 dazu nehmen

                                  Es genügt <= 5 oder < 6.

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

                                    @paul53 sorry, aber ich bin echt zu ....... manchmal...echt... wieso verstehe ich das nicht!!

                                    = 5 heisst das jetzt das das radio freitags, samstags und sonntags aus ist oder an....?

                                    Entschuldigt bitte....

                                    Kann ich das irgendwo nachlesen den Blockly Baustein?

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

                                      @kusselin sagte in Wochenblock in Blockly:

                                      Kann ich das irgendwo nachlesen den Blockly Baustein?

                                      dein Problem liegt nicht in dem Blockly Baustein, sondern in dem Verständnis für den Vergleichsoperator.

                                      heißt größer
                                      < heißt kleiner
                                      kommt noch ein = dazu heißt es größer (kleiner) und gleich

                                      <=5 schließt also 1,2,3,4 und 5 ein, also Montag bis Freitag

                                      Kusselin 1 Reply Last reply Reply Quote 0
                                      • Kusselin
                                        Kusselin @Homoran last edited by

                                        @homoran ok hoffe das ich das verstanden habe!!

                                        <= 3 schließt 1,2 und 3 ein also montag, Dienstag, Mittwoch
                                        Heißt Radio ist am Montag Dienstag und Mittwoch an.. richtig?

                                        Wie schaut’s dann aus wenn ich das Radio am Dienstag anhaben will und am Freitag?

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

                                          @kusselin sagte in Wochenblock in Blockly:

                                          wenn ich das Radio am Dienstag anhaben will und am Freitag?

                                          das geht nicht in einem Block, da musst du zweimal diese "Regel" mit oder verknüpfen, einmsl =2 und einmal =5

                                          Kusselin 1 Reply Last reply Reply Quote 0
                                          • Kusselin
                                            Kusselin @Homoran last edited by

                                            @homoran ok weil 2 gleich Dienstag ist und 5 gleich Freitag ist..

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            873
                                            Online

                                            32.1k
                                            Users

                                            80.7k
                                            Topics

                                            1.3m
                                            Posts

                                            3
                                            22
                                            738
                                            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