Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [Vorlage] Berechnung 1. Advent fürs aktuelle Jahr

    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

    [Vorlage] Berechnung 1. Advent fürs aktuelle Jahr

    This topic has been deleted. Only users with topic management privileges can see it.
    • FredF
      FredF Most Active Forum Testing last edited by

      Ist zwar schon vorbei...
      Ich brauchte diese Berechnung, da die Weihnachtsbeleuchtung ab 1. Advent leuchten sollte und da es (zumindest für mich) nicht so einfach war, hier mal für alle.
      Vielleicht geht es eleganter, es funktioniert jedenfalls:

      ed898043-9208-4ebf-bdc8-6acf6b64fd1e-grafik.png


      <xml xmlns="http://www.w3.org/1999/xhtml">
      <variables>
      <variable type="" id="h#@yoh[f1Pz,BotHhhT4">25.Dezember</variable>
      <variable type="" id="v9@J:+ywDiYh/WJT^y5H">1.Advent</variable>
      </variables>
      <block type="variables_set" id="NY6^GDJs#a^@fGxV_9$Q" x="-537" y="-862">
      <field name="VAR" id="h#@yoh[f1Pz,BotHhhT4" variabletype="">25.Dezember</field>
      <value name="VALUE">
      <block type="convert_from_date" id="HJTp,F+=gs3HW$9B.#/"> <mutation format="false" language="false"></mutation> <field name="OPTION">object</field> <value name="VALUE"> <block type="text_join" id="AcIS0Y-tgB6%jATs^(]n" inline="true"> <mutation items="2"></mutation> <value name="ADD0"> <block type="time_get" id="{[Q,EmotO1UQ9AiSFFT-"> <mutation format="false" language="false"></mutation> <field name="OPTION">fy</field> </block> </value> <value name="ADD1"> <block type="text" id="*V:yEm-|V^~@.7oxngPM"> <field name="TEXT">-12-25</field> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="1=#+BSHb=Q8ftkK=fItB"> <field name="VAR" id="v9@J:+ywDiYh/WJT^y5H" variabletype="">1.Advent</field> <value name="VALUE"> <block type="math_arithmetic" id="V[qs.K.g7xbV@$/EZ1NH" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="()M?ccWD9lo.6KoGkou?"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="HyKfVn$Y-sRHrz@^x@{!"> <field name="VAR" id="h#@yoh[f1Pz,BotHhhT4" variabletype="">25.Dezember</field> </block> </value> <value name="B"> <shadow type="math_number" id="Ytk)V9a1?P+%bl^l6n0D"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="vnIwCBAdDv4js;dJP!8_" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="N-tB+/4v+R#L.;_]I?T5"> <field name="NUM">86400000</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="i5V,(*Q{Yph~r82+/{!">
      <field name="NUM">1</field>
      </shadow>
      <block type="math_arithmetic" id="]Ob*;X*|+RD5AA?,?wEg" inline="false">
      <field name="OP">ADD</field>
      <value name="A">
      <shadow type="math_number" id="t}qS.[{{*~=8gnh-;PMe">
      <field name="NUM">1</field>
      </shadow>
      <block type="convert_from_date" id="v$aLf?w1}1P)7-}s}"> <mutation format="false" language="false"></mutation> <field name="OPTION">wd</field> <value name="VALUE"> <block type="variables_get" id="CNAcbM%=ywOaZHk~bk,;"> <field name="VAR" id="h#@yoh[f1Pz,BotHhhT4" variabletype="">25.Dezember</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="wE8c;D$?!=/M~s19,:iO"> <field name="NUM">21</field> </shadow> </value> </block> </value> </block> </value> </block> </value> </block> </next> </block> <block type="debug" id=")E_wH59tJ}TW5l+m|O." x="-537" y="-613">
      <field name="Severity">log</field>
      <value name="TEXT">
      <shadow type="text" id="bse51-93..ca]YlXfFzp">
      <field name="TEXT">test</field>
      </shadow>
      <block type="convert_from_date" id="_;gl6G%es/_pIA?v5:=@">
      <mutation format="false" language="false"></mutation>
      <field name="OPTION">DD.MM.YYYY</field>
      <value name="VALUE">
      <block type="variables_get" id="#tKaiB%]e)QvU?m#S3z;">
      <field name="VAR" id="v9@J:+ywDiYh/WJT^y5H" variabletype="">1.Advent</field>
      </block>
      </value>
      </block>
      </value>
      </block>
      </xml>

      W S 2 Replies Last reply Reply Quote 1
      • W
        Wildbill @FredF last edited by

        @fredf Auch wenn es schon paar Jährchen her ist, sage ich Danke. Genau sowas habe ich heute gesucht, Google hat das ausgespuckt und es funktioniert. Perfekt!

        Gruss, Jürgen

        1 Reply Last reply Reply Quote 0
        • S
          Schnotzler @FredF last edited by

          @fredf Cool!
          Leider verstehe ich es nicht.
          Wo kommt denn die "86400000" her?
          Was wird da warum addiert?

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

            @schnotzler sagte: Wo kommt denn die "86400000" her?

            Ein Tag hat 86400000 ms.

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

              @paul53 Da wäre ich jetzt nie darauf gekommen. 🙂
              Von Minuten bis Sekunden habe ich es schon Versucht aber auf die Idee mit ms bin ich leider nicht gekommen
              Danke

              1 Reply Last reply Reply Quote 0
              • S
                Siggi0904 last edited by Siggi0904

                Auch das Script von
                https://forum.iobroker.net/post/1089798
                ist nicht schlecht.

                Gleich mit Anzahl der Kerzen für die Visu.

                Mit leichter Anpassung gut nutzbar.

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

                Support us

                ioBroker
                Community Adapters
                Donate

                407
                Online

                31.9k
                Users

                80.3k
                Topics

                1.3m
                Posts

                blockly
                5
                6
                716
                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