Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. [Vorlage] Berechnung 1. Advent fürs aktuelle Jahr

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    719

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    5.9k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.5k

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

Scheduled Pinned Locked Moved Blockly
blockly
6 Posts 5 Posters 1.0k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • FredFF Offline
    FredFF Offline
    FredF
    Most Active Forum Testing
    wrote on last edited by
    #1

    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
    1
    • FredFF FredF

      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 Offline
      W Offline
      Wildbill
      wrote on last edited by
      #2

      @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
      0
      • FredFF FredF

        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>

        S Offline
        S Offline
        Schnotzler
        wrote on last edited by
        #3

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

        paul53P 1 Reply Last reply
        0
        • S Schnotzler

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

          paul53P Offline
          paul53P Offline
          paul53
          wrote on last edited by
          #4

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

          Ein Tag hat 86400000 ms.

          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

          S 1 Reply Last reply
          0
          • paul53P paul53

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

            Ein Tag hat 86400000 ms.

            S Offline
            S Offline
            Schnotzler
            wrote on last edited by
            #5

            @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
            0
            • Siggi0904S Offline
              Siggi0904S Offline
              Siggi0904
              wrote on last edited by Siggi0904
              #6

              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
              1

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              Support us

              ioBroker
              Community Adapters
              Donate

              268

              Online

              32.7k

              Users

              82.6k

              Topics

              1.3m

              Posts
              Community
              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
              ioBroker Community 2014-2025
              logo
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Home
              • Recent
              • Tags
              • Unread 0
              • Categories
              • Unreplied
              • Popular
              • GitHub
              • Docu
              • Hilfe