<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Mit Widget Gestylt Daten addieren]]></title><description><![CDATA[<p dir="auto">Hallo Forum, hallo Helfer!</p>
<p dir="auto">Ich schaffe es einfach nicht, aus zwei Widgets [Gestylt - Eingabe des Datums] und [Gestylt - Eingabe der Zeit] einen Datenpunkt zu erstellen, in welchem mir die beiden Daten zusammenzählt werden.</p>
<p dir="auto">Ich möchte damit einen zukünftigen Trigger erstellen, welcher mir ein Objekt auf "true" setzt.</p>
<p dir="auto">Hintergrund ist: Wenn ich ein paar Tage nicht zuhause bin, schalte ich den elektrischen Warmwasserboiler ab. Da ich den Zeitpunkt der Rückekehr weiß, soll die Boilersteuerung, zum erstellten Zeitpunkt, wieder auf "Ein" geschaltet werden.</p>
<p dir="auto">Bei [Gestylt - Eingabe der Zeit] wird immer das aktuelle Tagesdatum "mitgenommen" und eine Addition der beiden Objekte (Datum und Zeit) ergibt den falschen Wert. Beim konvertieren der Daten scheitere ich immer. Entweder wird gar nichts gerechnet oder das zukünftige Datum ist "doppelt soweit" in der Zukunft. Es muss nicht über dieses Widget gelöst werden, aber einen extra Adapter möchte ich für diese eine Aufgabe nicht installieren.</p>
<p dir="auto">Eventuell kann mir jemand auf die Sprünge helfen.</p>
<p dir="auto">BD und BG Tom</p>
]]></description><link>https://forum.iobroker.net/topic/84896/mit-widget-gestylt-daten-addieren</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 15:33:55 GMT</lastBuildDate><atom:link href="https://forum.iobroker.net/topic/84896.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 30 Jun 2026 16:38:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mit Widget Gestylt Daten addieren on Wed, 01 Jul 2026 07:34:33 GMT]]></title><description><![CDATA[<p dir="auto">Ich habe es doch noch mit Blockly geschafft.<br />
Mit Hilfe von <a href="https://forum.iobroker.net/topic/71431/gel%C3%B6st-dynamischer-cronjob-wie">https://forum.iobroker.net/topic/71431/gelöst-dynamischer-cronjob-wie</a> konnte ich den Trigger über die Widgets setzten.</p>
<p dir="auto">Mein abgewandeltes Blockly sieht so aus:<br />
</p><section class="spoiler-wrapper"><button class="spoiler-control btn btn-default">Spoiler</button><section style="display:none" class="spoiler-content"><p></p>
<pre><code>&lt;block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="}{npwZ~)?o^j89Z[d$[A" x="-37" y="671"&gt;
 &lt;mutation xmlns="http://www.w3.org/1999/xhtml" items="2"&gt;&lt;/mutation&gt;
 &lt;field name="CONDITION"&gt;ne&lt;/field&gt;
 &lt;field name="ACK_CONDITION"&gt;&lt;/field&gt;
 &lt;value name="OID0"&gt;
   &lt;shadow type="field_oid" id="I4*WB%Cx5+:qi#P!N;e8"&gt;
     &lt;field name="oid"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_Ein_Zeit&lt;/field&gt;
   &lt;/shadow&gt;
 &lt;/value&gt;
 &lt;value name="OID1"&gt;
   &lt;shadow type="field_oid" id="MW;(2TRn`+@j},m4tSHq"&gt;
     &lt;field name="oid"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_Ein_Datum&lt;/field&gt;
   &lt;/shadow&gt;
 &lt;/value&gt;
 &lt;statement name="STATEMENT"&gt;
   &lt;block type="schedule_clear" id="^t5@A`yzm:5}LI9E7JR`"&gt;
     &lt;field name="NAME"&gt;Boiler_Kalender_Ein&lt;/field&gt;
     &lt;next&gt;
       &lt;block type="controls_if" id="ynG%=fCq8A!s-HjfP|(H"&gt;
         &lt;value name="IF0"&gt;
           &lt;block type="logic_compare" id="9j?!g_E=*#NE5*-i5$nt"&gt;
             &lt;field name="OP"&gt;EQ&lt;/field&gt;
             &lt;value name="A"&gt;
               &lt;block type="get_value" id="+#BX82++qXEwqL*ZE,ag"&gt;
                 &lt;field name="ATTR"&gt;val&lt;/field&gt;
                 &lt;field name="OID"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_IO&lt;/field&gt;
               &lt;/block&gt;
             &lt;/value&gt;
             &lt;value name="B"&gt;
               &lt;block type="logic_boolean" id="dVLNGUB^rObfCtlrXW90"&gt;
                 &lt;field name="BOOL"&gt;FALSE&lt;/field&gt;
               &lt;/block&gt;
             &lt;/value&gt;
           &lt;/block&gt;
         &lt;/value&gt;
         &lt;statement name="DO0"&gt;
           &lt;block type="variables_set" id="{z#7S_cd!.T/fRCtJV/5"&gt;
             &lt;field name="VAR" id="%n44K3YM4$/I{$uvi)nS"&gt;Datum_Ein&lt;/field&gt;
             &lt;value name="VALUE"&gt;
               &lt;block type="get_value" id="U6T1Ou%7|L)Dz_2,`SR2"&gt;
                 &lt;field name="ATTR"&gt;val&lt;/field&gt;
                 &lt;field name="OID"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_Ein_Datum&lt;/field&gt;
               &lt;/block&gt;
             &lt;/value&gt;
             &lt;next&gt;
               &lt;block type="variables_set" id="*n,cQoPWid~3R8!T.G)E"&gt;
                 &lt;field name="VAR" id="*i3J=ool0in]}j9z#86_"&gt;Zeit_Ein&lt;/field&gt;
                 &lt;value name="VALUE"&gt;
                   &lt;block type="get_value" id="2C5@UbFjAzAI1YW3o`82"&gt;
                     &lt;field name="ATTR"&gt;val&lt;/field&gt;
                     &lt;field name="OID"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_Ein_Zeit&lt;/field&gt;
                   &lt;/block&gt;
                 &lt;/value&gt;
                 &lt;next&gt;
                   &lt;block type="schedule_create" id="@BGLkM/w^_e7]DvXON@f"&gt;
                     &lt;field name="NAME"&gt;Boiler_Kalender_Ein&lt;/field&gt;
                     &lt;value name="SCHEDULE"&gt;
                       &lt;shadow type="field_cron" id="},uocH)Cp{8z._K3NRc="&gt;
                         &lt;field name="CRON"&gt;* * * * *&lt;/field&gt;
                       &lt;/shadow&gt;
                       &lt;block type="cron_builder" id="o]ND+a|O8N):B/(2yGXB"&gt;
                         &lt;mutation xmlns="http://www.w3.org/1999/xhtml" seconds="false" as_line="false"&gt;&lt;/mutation&gt;
                         &lt;field name="LINE"&gt;FALSE&lt;/field&gt;
                         &lt;field name="WITH_SECONDS"&gt;FALSE&lt;/field&gt;
                         &lt;value name="DOW"&gt;
                           &lt;shadow type="text" id="Q`~Gxe,u:{c1T0,A.zaK"&gt;
                             &lt;field name="TEXT"&gt;*&lt;/field&gt;
                           &lt;/shadow&gt;
                         &lt;/value&gt;
                         &lt;value name="MONTHS"&gt;
                           &lt;shadow type="text" id=";UsQ2RM-!oy(|]YDZ+UL"&gt;
                             &lt;field name="TEXT"&gt;7&lt;/field&gt;
                           &lt;/shadow&gt;
                           &lt;block type="convert_from_date" id="Tg^)Y}dgH@dYC]jbgQzq"&gt;
                             &lt;mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"&gt;&lt;/mutation&gt;
                             &lt;field name="OPTION"&gt;custom&lt;/field&gt;
                             &lt;field name="FORMAT"&gt;TT&lt;/field&gt;
                             &lt;value name="VALUE"&gt;
                               &lt;block type="get_value" id="u:D)YCPATfaXV7-S!*nc"&gt;
                                 &lt;field name="ATTR"&gt;val&lt;/field&gt;
                                 &lt;field name="OID"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_Ein_Datum&lt;/field&gt;
                               &lt;/block&gt;
                             &lt;/value&gt;
                           &lt;/block&gt;
                         &lt;/value&gt;
                         &lt;value name="DAYS"&gt;
                           &lt;shadow type="text" id="=}6*2%k.%~M/T+Gzsf-N"&gt;
                             &lt;field name="TEXT"&gt;1&lt;/field&gt;
                           &lt;/shadow&gt;
                           &lt;block type="convert_from_date" id="SdSxSOTuyj=F9I#h+QAQ"&gt;
                             &lt;mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"&gt;&lt;/mutation&gt;
                             &lt;field name="OPTION"&gt;custom&lt;/field&gt;
                             &lt;field name="FORMAT"&gt;MM&lt;/field&gt;
                             &lt;value name="VALUE"&gt;
                               &lt;block type="get_value" id="r{B`Y}GN%TQ`WTxW[nnh"&gt;
                                 &lt;field name="ATTR"&gt;val&lt;/field&gt;
                                 &lt;field name="OID"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_Ein_Datum&lt;/field&gt;
                               &lt;/block&gt;
                             &lt;/value&gt;
                           &lt;/block&gt;
                         &lt;/value&gt;
                         &lt;value name="HOURS"&gt;
                           &lt;shadow type="text" id="30TLG.po?]%8leAt^wqI"&gt;
                             &lt;field name="TEXT"&gt;8&lt;/field&gt;
                           &lt;/shadow&gt;
                           &lt;block type="convert_from_date" id="-M@YF2@vo]4H_y68N)WB"&gt;
                             &lt;mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"&gt;&lt;/mutation&gt;
                             &lt;field name="OPTION"&gt;custom&lt;/field&gt;
                             &lt;field name="FORMAT"&gt;SS&lt;/field&gt;
                             &lt;value name="VALUE"&gt;
                               &lt;block type="get_value" id="?P`[Sf-8ud5T{3grPz8k"&gt;
                                 &lt;field name="ATTR"&gt;val&lt;/field&gt;
                                 &lt;field name="OID"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_Ein_Zeit&lt;/field&gt;
                               &lt;/block&gt;
                             &lt;/value&gt;
                           &lt;/block&gt;
                         &lt;/value&gt;
                         &lt;value name="MINUTES"&gt;
                           &lt;shadow type="text" id="=rh|g,;_6)1(o.44o+u)"&gt;
                             &lt;field name="TEXT"&gt;23&lt;/field&gt;
                           &lt;/shadow&gt;
                           &lt;block type="convert_from_date" id="@6`o/g78VN`Z.%B(yoRG"&gt;
                             &lt;mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"&gt;&lt;/mutation&gt;
                             &lt;field name="OPTION"&gt;custom&lt;/field&gt;
                             &lt;field name="FORMAT"&gt;mm&lt;/field&gt;
                             &lt;value name="VALUE"&gt;
                               &lt;block type="get_value" id="K1H^w0pJ%F.XR4yypEiK"&gt;
                                 &lt;field name="ATTR"&gt;val&lt;/field&gt;
                                 &lt;field name="OID"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_Ein_Zeit&lt;/field&gt;
                               &lt;/block&gt;
                             &lt;/value&gt;
                           &lt;/block&gt;
                         &lt;/value&gt;
                       &lt;/block&gt;
                     &lt;/value&gt;
                     &lt;statement name="STATEMENT"&gt;
                       &lt;block type="control" id="@,}3]Ea%@wK;IPgV3b!r"&gt;
                         &lt;mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"&gt;&lt;/mutation&gt;
                         &lt;field name="OID"&gt;0_userdata.0.Meine_Datenpunkte.KELLER.KE_Boiler_IO&lt;/field&gt;
                         &lt;field name="WITH_DELAY"&gt;FALSE&lt;/field&gt;
                         &lt;value name="VALUE"&gt;
                           &lt;block type="logic_boolean" id="DOu6Xm(DT6k[7(pipb0]"&gt;
                             &lt;field name="BOOL"&gt;TRUE&lt;/field&gt;
                           &lt;/block&gt;
                         &lt;/value&gt;
                       &lt;/block&gt;
                     &lt;/statement&gt;
                   &lt;/block&gt;
                 &lt;/next&gt;
               &lt;/block&gt;
             &lt;/next&gt;
           &lt;/block&gt;
         &lt;/statement&gt;
       &lt;/block&gt;
     &lt;/next&gt;
   &lt;/block&gt;
 &lt;/statement&gt;
&lt;/block&gt;
</code></pre>
<p dir="auto"></p></section></section><br />
<img src="/assets/uploads/files/1782890849151-9b006eb4-08f5-4212-8638-6273fcc81852-image-resized.jpeg" alt="9b006eb4-08f5-4212-8638-6273fcc81852-image.jpeg" class=" img-fluid img-markdown" /><p></p>
<p dir="auto">Die DP KE_Boiler_Ein_Datum und KE_Boiler_Ein_Zeit werden vom Widget [Gestylt - Eingabe des Datums] bzw. [Gestylt - Eingabe der Zeit] gefüllt.</p>
<p dir="auto">Was auffällt ist, dass TT und MM vertauscht sind (siehe debug). Das Datumsformat spuckt hier sicher rein, obwohl ich in den Systemeinstellungen DD.MM.YYYY eingetragen habe.</p>
<p dir="auto">Besten Dank an Alle</p>
]]></description><link>https://forum.iobroker.net/post/1346685</link><guid isPermaLink="true">https://forum.iobroker.net/post/1346685</guid><dc:creator><![CDATA[tom_33]]></dc:creator><pubDate>Wed, 01 Jul 2026 07:34:33 GMT</pubDate></item><item><title><![CDATA[Reply to Mit Widget Gestylt Daten addieren on Tue, 30 Jun 2026 19:39:17 GMT]]></title><description><![CDATA[<p dir="auto">Hallo Oliver!</p>
<p dir="auto">Vielen Dank für den Vorschlag. Ich hoffe, ich kann ihn morgen umsetzten. Vor allem gefällt mir das basic string widget</p>
]]></description><link>https://forum.iobroker.net/post/1346661</link><guid isPermaLink="true">https://forum.iobroker.net/post/1346661</guid><dc:creator><![CDATA[tom_33]]></dc:creator><pubDate>Tue, 30 Jun 2026 19:39:17 GMT</pubDate></item><item><title><![CDATA[Reply to Mit Widget Gestylt Daten addieren on Tue, 30 Jun 2026 19:11:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tom_33" aria-label="Profile: tom_33">@<bdi>tom_33</bdi></a></p>
<p dir="auto">das geht meiner meinung nach nur mit einem javascript und datenpunkte zum zwischenspeichern</p>
<p dir="auto">dp_date = der datenpunkt für das datumswidget<br />
dateFormat = da musst du mal schauen wie das datumswidget dein datum speichert. bei mir wird es im deutschen format gespeichert. auf basis dessen wird das datum geparsed. der browser ist bei mir auf englisch, daher das englische eingabeformat<br />
dp_time = der datenpunkt für dein zeit widget<br />
dp_result = der datenpunkt in den das datum dann als iso utc datum gespeichert wird.</p>
<pre><code>let dp_date="0_userdata.0.mydate";
let dp_time="0_userdata.0.mytime";
let dp_result="0_userdata.0.mystring";
let dateFormat = "DD.MM.YYYY";

function parseDate(dateString, format) {
    const tokenRegex = /(DD|MM|YYYY|YY)/g;

    const tokens = [];
    const regexPattern =
        "^" +
        format.replace(tokenRegex, (token) =&gt; {
            tokens.push(token);

            switch (token) {
                case "DD":
                    return "(\\d{1,2})";
                case "MM":
                    return "(\\d{1,2})";
                case "YYYY":
                    return "(\\d{4})";
                case "YY":
                    return "(\\d{2})";
            }
        }) +
        "$";

    const match = dateString.match(new RegExp(regexPattern));

    if (!match) {
        return null;
    }

    let day = 1;
    let month = 1;
    let year = 1970;

    tokens.forEach((token, index) =&gt; {
        const value = parseInt(match[index + 1], 10);

        switch (token) {
            case "DD":
                day = value;
                break;
            case "MM":
                month = value;
                break;
            case "YYYY":
                year = value;
                break;
            case "YY":
                year = value &lt; 70 ? 2000 + value : 1900 + value;
                break;
        }
    });

    // Datum in UTC erzeugen
    const date = new Date(Date.UTC(year, month - 1, day));

    // Validierung (z.B. 31.02.2025 erkennen)
    if (
        date.getUTCFullYear() !== year ||
        date.getUTCMonth() !== month - 1 ||
        date.getUTCDate() !== day
    ) {
        return null;
    }

    // ISO-8601 UTC zurückgeben
    return date.toISOString();
}
function combineUtcDateAndTime(dateIso, timeIso) {
    const date = new Date(dateIso);
    const time = new Date(timeIso);

    return new Date(Date.UTC(
        date.getUTCFullYear(),
        date.getUTCMonth(),
        date.getUTCDate(),
        time.getUTCHours(),
        time.getUTCMinutes(),
        time.getUTCSeconds(),
        time.getUTCMilliseconds()
    )).toISOString();
}
on([dp_date,dp_time], async function (obj) {
    let dTime= await getState(dp_time).val;
    let strTime = new Date(dTime).toISOString();
    let strDate= parseDate(await getState(dp_date).val,dateFormat);
    const result = combineUtcDateAndTime(strDate, strTime);
    await setState(dp_result,result);

});


</code></pre>
<p dir="auto">zur anzeige des kombinierten datums habe ich dann das folgende basic string widget mit einem binding zur formatierung hinzugefügt</p>
<p dir="auto"></p><section class="spoiler-wrapper"><button class="spoiler-control btn btn-default">Spoiler</button><section style="display:none" class="spoiler-content"><p></p>
<pre><code>[
 {
   "tpl": "tplValueString",
   "data": {
     "bindings": [],
     "oid": "",
     "html_prepend": "{0_userdata.0.mystring;momentDate(DD.MM.YYYY HH:mm:ss)}"
   },
   "style": {
     "bindings": [],
     "left": 265,
     "top": 168,
     "width": "190px",
     "height": "30px"
   },
   "widgetSet": "basic",
   "_id": "i000001"
 }
]
</code></pre>
<p dir="auto"></p></section></section><p></p>
<p dir="auto"><img src="/assets/uploads/files/1782846646919-d669b364-3ccb-44d4-bc3b-4ad0ab6b5881-image.jpeg" alt="d669b364-3ccb-44d4-bc3b-4ad0ab6b5881-image.jpeg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.iobroker.net/post/1346657</link><guid isPermaLink="true">https://forum.iobroker.net/post/1346657</guid><dc:creator><![CDATA[OliverIO]]></dc:creator><pubDate>Tue, 30 Jun 2026 19:11:52 GMT</pubDate></item></channel></rss>