@tt-tom Hatte ich schon mal aber da gab es keine richtige Antwort.
Ich hab ein kleines Blockly gemacht, welches die Sekunden in eine Zeit umwandelt. Ich muss da nur noch einen Umschalter reinmachen ob der Timer ein Timer ist oder eine Uhrzeit, damit die Uhrzeit nicht runter gezählt wird sobald sie eingestellt ist.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="86:D-8adXijp2={gDX23">min</variable> <variable id="r9w9}E;K]NRS:pL{,V%4">std</variable> </variables> <block type="on_ext" id="!*|$z^H*ZXYt?sTK*chm" x="113" y="-587"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="3SKRKl%A3kg+R46C@SrH"> <field name="oid">0_userdata.0.Timer.ACTUAL</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="W6j|lu.e?F64/a5R2+!/"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="dPXpAnMtYN|vo{ZN@DRD"> <field name="OP">GT</field> <value name="A"> <block type="on_source" id="q%h;;.j:aF8eLOq0W)fx"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="he4I6e,jS?x1P-coYg^,"> <field name="NUM">59</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="4HBrdd2#s0t5dUuWCV]~"> <field name="VAR" id="86:D-8adXijp2={gDX23">min</field> <value name="VALUE"> <block type="math_modulo" id="WyYd?3;TUi[Kj9N;RmA#"> <value name="DIVIDEND"> <shadow type="math_number" id="tt^3A#VF#m;Gx;b:9XAg"> <field name="NUM">64</field> </shadow> <block type="on_source" id="}%42#6@f[Qz95@2:Lpd["> <field name="ATTR">state.val</field> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id=".?7hFOLfC.1YQ/rTW;k?"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="Hh;MTmaxBD^(@s$]K!+b"> <field name="VAR" id="r9w9}E;K]NRS:pL{,V%4">std</field> <value name="VALUE"> <block type="math_arithmetic" id="%Pxsz^z:`Mk[Xh1{@ZO."> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="?XvM(/Z9rJaq_ByB;-1["> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="Jwo8Gdsf6DZ*}M~2bWGw"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="o@Ul)m+x=)jF0lth.WFY"> <field name="NUM">1</field> </shadow> <block type="on_source" id="I#VoJa5*b[jW|6-Xs2XC"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <shadow type="math_number" id="F`mWn%m$vLIkOw)!z$9O"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="yj#G1*{JMSv%[.EgGLpY"> <field name="VAR" id="86:D-8adXijp2={gDX23">min</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="tO2o(96fy:qz!j)X}2kc"> <field name="NUM">60</field> </shadow> </value> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="bbBvgb;%w7.;$TL8gcXc"> <field name="OP">LTE</field> <value name="A"> <block type="on_source" id="@{!BfD!,1MGg0JjPX`/@"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="r}]UJd|1{2B27+@L|frZ"> <field name="NUM">59</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="y!YFxqxr,A[jgGh)Jn5Q"> <field name="VAR" id="86:D-8adXijp2={gDX23">min</field> <value name="VALUE"> <block type="on_source" id=",Az_K{xVZWGMGEy6MuU-"> <field name="ATTR">state.val</field> </block> </value> </block> </statement> <next> <block type="control" id="tOGxdGp,[2b$rHwHUp{v"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Timer.Zeit.std</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="vMtU^(jbol6i,-I.X.a%"> <field name="VAR" id="r9w9}E;K]NRS:pL{,V%4">std</field> </block> </value> <next> <block type="control" id="Zz[)mx.;P1$=RD3TrsFs"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Timer.Zeit.min</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="Ol~.{Zw2xyMb@R2OFP`7"> <field name="VAR" id="86:D-8adXijp2={gDX23">min</field> </block> </value> <next> <block type="control" id="w5?op69x/#WL)ChDImu#"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Timer.Zeit.Zeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="Dz..P0PH}U+y*,=x.[2M"> <mutation items="5"></mutation> <value name="ADD0"> <block type="variables_get" id=",E+RX=qXxg79m#+J=X6G"> <field name="VAR" id="r9w9}E;K]NRS:pL{,V%4">std</field> </block> </value> <value name="ADD1"> <block type="text" id="pRoD#[vtwzAnWY@)zz-m"> <field name="TEXT">:</field> </block> </value> <value name="ADD2"> <block type="variables_get" id=")8Mo94l4kYjL!OEqB#Q="> <field name="VAR" id="86:D-8adXijp2={gDX23">min</field> </block> </value> <value name="ADD3"> <block type="text" id="@pQu}W.@VrE32ny[x#n_"> <field name="TEXT">:</field> </block> </value> <value name="ADD4"> <block type="text" id="0E!wP$K[R4C)Z@BJNtY-"> <field name="TEXT">00</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> <block type="schedule" id="CT1[DYShkPFSs,*O#g]:" x="763" y="-537"> <field name="SCHEDULE">*/10 * * * * *</field> <statement name="STATEMENT"> <block type="controls_if" id="0HEj[/r]9f6D|B8;Y`[?"> <value name="IF0"> <block type="time_compare_ex" id="FI~[ksEr0IwTcg=QkwBE"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">==</field> <value name="START_TIME"> <shadow type="text" id="XL89tet[4DQ5cb)y~yt="> <field name="TEXT">12:00</field> </shadow> <block type="get_value" id="x@I%dHA33Pol:IzuUQ_["> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Timer.Zeit.Zeit</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="Xyt]m1MR,knVLpkR_8-."> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Timer.Zeit.Alarm</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="sMK/cam7xTpNI]G-!EO7"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </statement> </block> </xml>