Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Angabe von Zeitraum im Jahr im Blockly!

    NEWS

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

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    Angabe von Zeitraum im Jahr im Blockly!

    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      LaBamba last edited by LaBamba

      Ich habe für meine Fensterlüftung ein Skript geschrieben.
      Es funktioniert perfekt, wenn ich den Jahreszeitraum hier nicht einsetze.
      Anscheinend gibt es ein Problem mit dem Jahresübergang.
      Wie könnte ich dies lösen.

      d11da8e7-bb17-4fb0-b35f-5979d28ebc1e-grafik.png


      <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
      <variable type="timeout" id="timeout11">timeout11</variable>
      <variable type="interval" id="Intervall11">Intervall11</variable>
      <variable type="timeout" id="timeout12">timeout12</variable>
      <variable type="interval" id="Intervall12">Intervall12</variable>
      </variables>
      <block type="comment" id="=y%mX[)T(slg_/^ee(=2" x="-588" y="-913">
      <field name="COMMENT">>5-<=10</field>
      <next>
      <block type="on" id="Z+]H_O16CG~]lQR=.4^#">
      <field name="OID">zigbee.0.00158d0003a4845d.opened</field>
      <field name="CONDITION">ne</field>
      <field name="ACK_CONDITION"></field>
      <statement name="STATEMENT">
      <block type="controls_if" id="%+U0=OvXkvkIVv}a$/j1">
      <mutation else="1"></mutation>
      <value name="IF0">
      <block type="logic_operation" id="dO8yx9B}1AsQwtY8qon" inline="false">
      <field name="OP">AND</field>
      <value name="A">
      <block type="logic_compare" id="9Ie7,7Q]mc!5v(Jxa64"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="qX?K~=]IlK/2f}LV#9OP"> <field name="ATTR">val</field> <field name="OID">zigbee.0.00158d0003a4845d.opened</field> </block> </value> <value name="B"> <block type="logic_boolean" id="o+F}j-9%9^eoNSqnWlod"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="1P.Oe8i0z-w+OJ%7?Jkz" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="KE?w.?6KWCrc?XVp33O">
      <field name="OP">GTE</field>
      <value name="A">
      <block type="time_get" id="Mj+p.9OLR0}$wGLQ4ZH"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">MM/DD</field> </block> </value> <value name="B"> <block type="text" id="X.s_,#f:yHo060H9~Hpt"> <field name="TEXT">05/15</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="Dh2L@aabT=.uY|V:~wW|" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="8~]KiQ]!bw4(aZJJc=J">
      <field name="OP">LTE</field>
      <value name="A">
      <block type="time_get" id="s#Be/=-{W(Xw@Ev8pc@r">
      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
      <field name="OPTION">MM/DD</field>
      </block>
      </value>
      <value name="B">
      <block type="text" id="TL4hhz63C4O_/tnaX$7"> <field name="TEXT">09/15</field> </block> </value> </block> </value> <value name="B"> <block type="logic_operation" id="-MOhvXQgh~|_l)-IpqGj" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="Wch5An46+f^y,mH)=BN">
      <field name="OP">GT</field>
      <value name="A">
      <block type="get_value" id="28O%/?SA-CUve;s
      rsey">
      <field name="ATTR">val</field>
      <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field>
      </block>
      </value>
      <value name="B">
      <block type="math_number" id="^dZ)Sfn/;V0DVeT!Oc[T">
      <field name="NUM">5</field>
      </block>
      </value>
      </block>
      </value>
      <value name="B">
      <block type="logic_compare" id="^[uwk]khgQ9p7qRkidNc">
      <field name="OP">LTE</field>
      <value name="A">
      <block type="get_value" id="l:yBOMEf1?|VKGlpJK(">
      <field name="ATTR">val</field>
      <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field>
      </block>
      </value>
      <value name="B">
      <block type="math_number" id="u)|Ee{/81zv~WK98.9k"> <field name="NUM">10</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="IiegDdE5Q2gT^Yk+Ln+">
      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
      <field name="OID">shelly.0.SHSW-25#687E4F#1.Shutter.Position</field>
      <field name="WITH_DELAY">FALSE</field>
      <value name="VALUE">
      <block type="math_number" id="{YMkWI4(30Er#nU}2%Zn">
      <field name="NUM">100</field>
      </block>
      </value>
      <next>
      <block type="control" id="BX5{72ikK15(wn+A^1lB">
      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
      <field name="OID">alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement</field>
      <field name="WITH_DELAY">TRUE</field>
      <field name="DELAY_MS">1</field>
      <field name="UNIT">sec</field>
      <field name="CLEAR_RUNNING">FALSE</field>
      <value name="VALUE">
      <block type="text_join" id="~L|y:x6$Zm=uN2e?Xi5Q">
      <mutation items="4"></mutation>
      <value name="ADD0">
      <block type="text" id="[DOnj@BLe_Mv1UG47TQr">
      <field name="TEXT">Es hat gerade</field>
      </block>
      </value>
      <value name="ADD1">
      <block type="get_value" id="~e]@U$mel3i3fjBq+azJ">
      <field name="ATTR">val</field>
      <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field>
      </block>
      </value>
      <value name="ADD2">
      <block type="text" id="!p,jwqz?H,niEKix|E6h">
      <field name="TEXT">Grad Außentemperatur</field>
      </block>
      </value>
      <value name="ADD3">
      <block type="text" id="khd{}iX{+.p5+ke#4w=D">
      <field name="TEXT">Erinnerung nach 6 Minuten</field>
      </block>
      </value>
      </block>
      </value>
      <next>
      <block type="timeouts_settimeout" id="Rg7Tt_%{E9P-F%98_Kop">
      <field name="NAME">timeout11</field>
      <field name="DELAY">4</field>
      <field name="UNIT">min</field>
      <statement name="STATEMENT">
      <block type="timeouts_setinterval" id="(v?|pH)fri:,m22DoMyY">
      <field name="NAME">Intervall11</field>
      <field name="INTERVAL">2</field>
      <field name="UNIT">min</field>
      <statement name="STATEMENT">
      <block type="control" id="EyGg!%S_-FhVgEDeRN%l">
      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
      <field name="OID">alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement</field>
      <field name="WITH_DELAY">FALSE</field>
      <value name="VALUE">
      <block type="text_join" id="{%0yHrsh1rw^~,6mn6+3">
      <mutation items="1"></mutation>
      <value name="ADD0">
      <block type="text" id="X^4U?cIX0-6R0_M2]R$^">
      <field name="TEXT">Bitte das Badfenster wieder schließen</field>
      </block>
      </value>
      </block>
      </value>
      </block>
      </statement>
      </block>
      </statement>
      </block>
      </next>
      </block>
      </next>
      </block>
      </statement>
      <statement name="ELSE">
      <block type="timeouts_cleartimeout" id="wk}TGiSY,|~9b}-l}:||">
      <field name="NAME">timeout11</field>
      <next>
      <block type="timeouts_clearinterval" id=";mft]#pHsk%se{(6:Kof">
      <field name="NAME">Intervall11</field>
      </block>
      </next>
      </block>
      </statement>
      </block>
      </statement>
      <next>
      <block type="on" id="?+H)+hLXv./,S7UY09j#">
      <field name="OID">zigbee.0.00158d0003a4845d.opened</field>
      <field name="CONDITION">ne</field>
      <field name="ACK_CONDITION"></field>
      <statement name="STATEMENT">
      <block type="controls_if" id=",Sjd6(4OPZ.24l~;4gq=">
      <mutation else="1"></mutation>
      <value name="IF0">
      <block type="logic_operation" id="xm9jgvM-H4L%JJ;~m}3Z" inline="false">
      <field name="OP">AND</field>
      <value name="A">
      <block type="logic_compare" id="tG,b_[UwP5TxW;65rr(:">
      <field name="OP">EQ</field>
      <value name="A">
      <block type="get_value" id="6i,nG24Y(]3b7oG$sY6r">
      <field name="ATTR">val</field>
      <field name="OID">zigbee.0.00158d0003a4845d.opened</field>
      </block>
      </value>
      <value name="B">
      <block type="logic_boolean" id="c4Nffu4WY.]v0y$eiJ2.">
      <field name="BOOL">TRUE</field>
      </block>
      </value>
      </block>
      </value>
      <value name="B">
      <block type="logic_operation" id="@Es5NtR~vmA5{0p00]lq" inline="false">
      <field name="OP">AND</field>
      <value name="A">
      <block type="logic_compare" id="a(V/0O70bnmC?XvcN^()">
      <field name="OP">LT</field>
      <value name="A">
      <block type="time_get" id="3at@WQHrHW8u@^o4yDZF">
      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
      <field name="OPTION">MM/DD</field>
      </block>
      </value>
      <value name="B">
      <block type="text" id="Km~6v[k0haqa5){!|R5A">
      <field name="TEXT">05/15</field>
      </block>
      </value>
      </block>
      </value>
      <value name="B">
      <block type="logic_operation" id="iH5rp?V/kj3GjGSMGU@K" inline="false">
      <field name="OP">AND</field>
      <value name="A">
      <block type="logic_compare" id="KHO=HB|Z+?kW51A{PJE0">
      <field name="OP">GT</field>
      <value name="A">
      <block type="time_get" id="$D4}}^D@CWAXzBnb$|O2">
      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
      <field name="OPTION">MM/DD</field>
      </block>
      </value>
      <value name="B">
      <block type="text" id="P/;.2{[;yLh+l@P=}7sF">
      <field name="TEXT">09/15</field>
      </block>
      </value>
      </block>
      </value>
      <value name="B">
      <block type="logic_operation" id="IdSOqB)Pewhlr1G^N[OC" inline="false">
      <field name="OP">AND</field>
      <value name="A">
      <block type="logic_compare" id="G/yb,=dxsQirZ(e|!%s">
      <field name="OP">GT</field>
      <value name="A">
      <block type="get_value" id="C$
      .04hOZ!KV]_D+y0|"> <field name="ATTR">val</field> <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field> </block> </value> <value name="B"> <block type="math_number" id="[!8),RRi,*uq6#_U}Mb4"> <field name="NUM">5</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id=":}0}$tkk7?i~Sw]Yj+5S"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="9SqI*}S)NShs%969ie:">
      <field name="ATTR">val</field>
      <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field>
      </block>
      </value>
      <value name="B">
      <block type="math_number" id="=$xJkcV-IT9qt4eeDn6l">
      <field name="NUM">10</field>
      </block>
      </value>
      </block>
      </value>
      </block>
      </value>
      </block>
      </value>
      </block>
      </value>
      </block>
      </value>
      <statement name="DO0">
      <block type="control" id=":NIvQZBkAe0ma%~7VB">
      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
      <field name="OID">shelly.0.SHSW-25#687E4F#1.Shutter.Position</field>
      <field name="WITH_DELAY">FALSE</field>
      <value name="VALUE">
      <block type="math_number" id="ENmN9}L3dUx
      MsE04~8">
      <field name="NUM">100</field>
      </block>
      </value>
      <next>
      <block type="control" id="vOvI6~EIgWBa%7k-Yx~I">
      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
      <field name="OID">alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement</field>
      <field name="WITH_DELAY">TRUE</field>
      <field name="DELAY_MS">1</field>
      <field name="UNIT">sec</field>
      <field name="CLEAR_RUNNING">FALSE</field>
      <value name="VALUE">
      <block type="text_join" id="scabjvR
      l2}VV@5QPf=W">
      <mutation items="4"></mutation>
      <value name="ADD0">
      <block type="text" id="zyeZ5DB@m04;ch7fYw1b">
      <field name="TEXT">Es hat gerade</field>
      </block>
      </value>
      <value name="ADD1">
      <block type="get_value" id=",iPGWRQIMtChJptF/KZ9">
      <field name="ATTR">val</field>
      <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field>
      </block>
      </value>
      <value name="ADD2">
      <block type="text" id="a8d51MJt9SBD}Ca%MP2?">
      <field name="TEXT">Grad Außentemperatur</field>
      </block>
      </value>
      <value name="ADD3">
      <block type="text" id="7Ylaefyy9nR:BI5G#_!.">
      <field name="TEXT">Erinnerung nach 5 Minuten</field>
      </block>
      </value>
      </block>
      </value>
      <next>
      <block type="timeouts_settimeout" id="sWHVO5h:d9;V^X?--!L]">
      <field name="NAME">timeout12</field>
      <field name="DELAY">4</field>
      <field name="UNIT">min</field>
      <statement name="STATEMENT">
      <block type="timeouts_setinterval" id="i:fM=~SB5xTGiz*CEHG+">
      <field name="NAME">Intervall12</field>
      <field name="INTERVAL">1</field>
      <field name="UNIT">min</field>
      <statement name="STATEMENT">
      <block type="control" id="?9TZH6Qc9L}KMTfLO%)h">
      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
      <field name="OID">alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement</field>
      <field name="WITH_DELAY">FALSE</field>
      <value name="VALUE">
      <block type="text_join" id="Dg@812BDTaoq#biGu:@"> <mutation items="1"></mutation> <value name="ADD0"> <block type="text" id="#UbL}Oy;{]o2srss5~pC"> <field name="TEXT">Bitte das Badfenster wieder schließen</field> </block> </value> </block> </value> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_cleartimeout" id="Mvw7-E_5/Y7j#R3p4vV">
      <field name="NAME">timeout12</field>
      <next>
      <block type="timeouts_clearinterval" id="GJwmPqpHV^(vI2%:S#Xk">
      <field name="NAME">Intervall12</field>
      </block>
      </next>
      </block>
      </statement>
      </block>
      </statement>
      </block>
      </next>
      </block>
      </next>
      </block>
      <block type="get_value" id="^6X:tYMqNG)T7(JRNq4:" x="-99" y="3537">
      <field name="ATTR">val</field>
      <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field>
      </block>
      <block type="get_value" id=")9#L-:!)D!eW|NJ~b(H]" x="-95" y="4910">
      <field name="ATTR">val</field>
      <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field>
      </block>
      <block type="get_value" id="`rPCgZJOk_dcCgT_4{~l" x="-107" y="6931">
      <field name="ATTR">val</field>
      <field name="OID">viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value</field>
      </block>
      </xml>

      @apollon77
      @haselchen
      @arteck

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

        @labamba sagte: wenn ich den Jahreszeitraum hier nicht einsetze.

        Was meinst Du mit "Jahreszeitraum"?
        Weshalb doppelt? Sind das mehrere Badfenster?

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

          @paul53

          Hallo Paul,

          ich habe zwei Zeiträume. Vom 15.5-15.9 und vom 16.9-14.5.
          Ich habe die Vermutung, dass sich das Skript bei den Jahreszeiträumen aufhängt.

          Um dies zu Überprüfen habe ich diese mal entfernt und es hat wunderbar funtkioniert.
          Meine Vermutung ist, das der Jahresbereich vom 16.09-14.5 Probleme macht. Vermutlich wegen dem Jahresübergang.
          Gibt es eine Alternative den Zeitraum zu definieren?

          Gruße

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

            @labamba
            Bitte alles in einen Trigger packen!

            @labamba sagte in Angabe von Zeitraum im Jahr im Blockly!:

            der Jahresbereich vom 16.09-14.5 Probleme macht.

            Die Bereiche ab 16.09. und bis 14.05. müssen per ODER verknüpft werden. Einfacher:

            Bild_2022-02-09_131517.png

            Worin unterscheiden sich die Aktionen im Winter vom Sommer?

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

              @paul53

              Die Idee ist gut, aber ich benötige das sonst für mein Timeout und die zyklische Unterbrechung. Zudem habe ich im Sommer noch mehr Fälle nach Uhrzeit.

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

                @labamba sagte: ich benötige das sonst für mein Timeout und die zyklische Unterbrechung.

                Das "sonst" ist weiterhin für das Stoppen der Timer vorhanden.

                Bild_2022-02-09_132409.png

                Du hast meine Frage nicht beantwortet:
                @paul53 sagte in Angabe von Zeitraum im Jahr im Blockly!:

                Worin unterscheiden sich die Aktionen im Winter vom Sommer?

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

                  @paul53

                  Die Aktionen im Sommer und Winter unterscheiden sich durch den Lüftungszeitraum.
                  Die Lüftungszeiträume sind von der Außentemperatur dann nochmals abhängig.

                  Zudem habe ich im Sommer noch einen Fall, z.B. Lüften vor 9 Uhr und nach 9 Uhr.
                  Damit ich bei sehr warmen Temperaturen das Gebäude kühlen kann und nicht zu warme Luft hereinlüfte.

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

                    @labamba
                    Danke. Das alles ist in Deinem Blockly-Bild nicht zu erkennen.

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

                      @paul53

                      So mal das Ganze! Ich dachte ich begrenze es bzgl. der Übersichtlichkeit.
                      Ich habe gerade festgestellt, dass ich es nicht Spoilern kann da es zu groß hier ist.

                      paul53 L 2 Replies Last reply Reply Quote 0
                      • paul53
                        paul53 @LaBamba last edited by

                        @labamba sagte: Ich habe gerade festgestellt, dass ich es nicht Spoilern kann da es zu groß hier ist.

                        Auch mit Spoiler und Code tags?
                        XML bitte immer in Code tags posten.

                        1 Reply Last reply Reply Quote 0
                        • L
                          LaBamba @LaBamba last edited by LaBamba

                          @paul53
                          Ja , kommt immer longer than 100000 charakters

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

                            @labamba sagte: kommt immer longer than 100000 charakters

                            Kannst Du mehrere Bilder untereinander posten, so dass es noch erkennbar ist?

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

                              @labamba
                              Man kann sicherlich einige Aktionen für Sommer und Winter zusammenfassen?

                              Bild_2022-02-09_141536.png

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

                                @labamba sagte: kommt immer longer than 100000 charakters

                                Wie sieht es mit dem erzeugten Javascript-Code ohne die letzte Zeile aus (Code tags!)?

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

                                  @paul53

                                  var timeout, Intervall, timeout11, Intervall11, timeout12, Intervall12, timeout13, Intervall13, timeout14, Intervall14, timeout15, Intervall15;
                                  
                                  
                                  // <=5
                                  on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    if (getState("zigbee.0.00158d0003a4845d.opened").val == true && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 5) {
                                      setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                      setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 4 Minuten'].join('')), 1000, false);
                                      timeout = setTimeout(async function () {
                                        Intervall = setInterval(async function () {
                                          setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                        }, 60000);
                                      }, 180000);
                                    } else {
                                      (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                                      (function () {if (Intervall) {clearInterval(Intervall); Intervall = null;}})();
                                    }
                                  });
                                  // >5-<=10
                                  on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    if (getState("zigbee.0.00158d0003a4845d.opened").val == true && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 5 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 10) {
                                      setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                      setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 6 Minuten'].join('')), 1000, false);
                                      timeout11 = setTimeout(async function () {
                                        Intervall11 = setInterval(async function () {
                                          setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                        }, 120000);
                                      }, 240000);
                                    } else {
                                      (function () {if (timeout11) {clearTimeout(timeout11); timeout11 = null;}})();
                                      (function () {if (Intervall11) {clearInterval(Intervall11); Intervall11 = null;}})();
                                    }
                                  });
                                  on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") < '05/15' && formatDate(new Date(), "MM/DD") > '09/15' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 5 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 10) {
                                      setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                      setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 5 Minuten'].join('')), 1000, false);
                                      timeout12 = setTimeout(async function () {
                                        Intervall12 = setInterval(async function () {
                                          setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                        }, 60000);
                                      }, 240000);
                                    } else {
                                      (function () {if (timeout12) {clearTimeout(timeout12); timeout12 = null;}})();
                                      (function () {if (Intervall12) {clearInterval(Intervall12); Intervall12 = null;}})();
                                    }
                                  });
                                  // >10-<=15
                                  on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '15/09' && compareTime('00:00', '09:30', "between", null) && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 10 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 15) {
                                      setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                      setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 12 Minuten'].join('')), 1000, false);
                                      timeout13 = setTimeout(async function () {
                                        Intervall13 = setInterval(async function () {
                                          setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                        }, 120000);
                                      }, 600000);
                                    } else {
                                      (function () {if (timeout13) {clearTimeout(timeout13); timeout13 = null;}})();
                                      (function () {if (Intervall13) {clearInterval(Intervall13); Intervall13 = null;}})();
                                    }
                                  });
                                  on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '15/09' && compareTime('9:31', '23:59', "between", null) && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 10 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 15) {
                                      setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                      setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 9 Minuten'].join('')), 1000, false);
                                      timeout14 = setTimeout(async function () {
                                        Intervall14 = setInterval(async function () {
                                          setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                        }, 120000);
                                      }, 420000);
                                    } else {
                                      (function () {if (timeout14) {clearTimeout(timeout14); timeout14 = null;}})();
                                      (function () {if (Intervall14) {clearInterval(Intervall14); Intervall14 = null;}})();
                                    }
                                  });
                                  on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") < '05/15' && formatDate(new Date(), "MM/DD") > '15/09' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 10 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 15) {
                                      setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                      setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 7 Minuten'].join('')), 1000, false);
                                      timeout15 = setTimeout(async function () {
                                        Intervall15 = setInterval(async function () {
                                          setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                        }, 120000);
                                      }, 300000);
                                    } else {
                                      (function () {if (timeout15) {clearTimeout(timeout15); timeout15 = null;}})();
                                      (function () {if (Intervall15) {clearInterval(Intervall15); Intervall15 = null;}})();
                                    }
                                  });
                                  
                                  formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '09/15' && true;
                                  
                                  getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val;
                                  
                                  getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val;
                                  
                                  paul53 L 2 Replies Last reply Reply Quote 0
                                  • paul53
                                    paul53 @LaBamba last edited by paul53

                                    @labamba
                                    Mit nur einem Trigger und einigen Variablen:

                                    <xml xmlns="https://developers.google.com/blockly/xml">
                                     <variables>
                                       <variable id="]QNA]6mC/m=YN4#MWOV;">AT</variable>
                                       <variable id="4RnZsx32p9:0WHh7`},t">delay</variable>
                                       <variable id="zL[s}0F!ZKt(|[4;3urB">erinnern</variable>
                                       <variable id="!$%d@O83Ka[rhkXU1dP%">repeat</variable>
                                       <variable type="timeout" id="timeout">timeout</variable>
                                       <variable type="interval" id="Intervall">Intervall</variable>
                                     </variables>
                                     <block type="on_ext" id="j/`@HZdJ~17vrQ9X7RO7" x="248" y="242">
                                       <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="[MlNQNzJOYHV_G/sW_9V">
                                           <field name="oid">default</field>
                                         </shadow>
                                       </value>
                                       <statement name="STATEMENT">
                                         <block type="controls_if" id="}jIUn/,`CitVWam5*!{j">
                                           <mutation else="1"></mutation>
                                           <value name="IF0">
                                             <block type="on_source" id="~+^c(d)9Pp};9=d;k^(~">
                                               <field name="ATTR">state.val</field>
                                             </block>
                                           </value>
                                           <statement name="DO0">
                                             <block type="variables_set" id="2ceJWHTViZpB}Lg8$xoB">
                                               <field name="VAR" id="]QNA]6mC/m=YN4#MWOV;">AT</field>
                                               <value name="VALUE">
                                                 <block type="get_value" id="OZyemU2M,pG#4M6.fCBz">
                                                   <field name="ATTR">val</field>
                                                   <field name="OID">0_userdata.0.Aussen.Klima.Temperatur</field>
                                                 </block>
                                               </value>
                                               <next>
                                                 <block type="controls_if" id="c5xSBiVLfyVzB?#LjsPQ">
                                                   <value name="IF0">
                                                     <block type="logic_compare" id="~+bKEi6D]y8w@}_#rwy^">
                                                       <field name="OP">LTE</field>
                                                       <value name="A">
                                                         <block type="variables_get" id="EaYhjM/*5p*VaDcauJg$">
                                                           <field name="VAR" id="]QNA]6mC/m=YN4#MWOV;">AT</field>
                                                         </block>
                                                       </value>
                                                       <value name="B">
                                                         <block type="math_number" id="SRy%F+0y6.w=-E*rvM/v">
                                                           <field name="NUM">15</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <statement name="DO0">
                                                     <block type="controls_if" id="52|^M-0g=Z32yAPO8UG]">
                                                       <mutation elseif="2" else="1"></mutation>
                                                       <value name="IF0">
                                                         <block type="logic_compare" id="6lOVHGxA9RaGAwK]$0KW">
                                                           <field name="OP">LTE</field>
                                                           <value name="A">
                                                             <block type="variables_get" id="hLfiQMq3*/1oM3C(NbhB">
                                                               <field name="VAR" id="]QNA]6mC/m=YN4#MWOV;">AT</field>
                                                             </block>
                                                           </value>
                                                           <value name="B">
                                                             <block type="math_number" id="okdf/i^obCKMb^V@0NCo">
                                                               <field name="NUM">5</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <statement name="DO0">
                                                         <block type="variables_set" id="Gw|KFup}:lxb+s=Cw,@a">
                                                           <field name="VAR" id="4RnZsx32p9:0WHh7`},t">delay</field>
                                                           <value name="VALUE">
                                                             <block type="math_number" id="_B7IBLbz`j9IO|sRYKFB">
                                                               <field name="NUM">180000</field>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="variables_set" id="7`b,{0M:mg[rnT1?ppqb">
                                                               <field name="VAR" id="!$%d@O83Ka[rhkXU1dP%">repeat</field>
                                                               <value name="VALUE">
                                                                 <block type="math_number" id="O4_{|}/yrW@,|hcV+21:">
                                                                   <field name="NUM">60000</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </statement>
                                                       <value name="IF1">
                                                         <block type="logic_compare" id="DgHn#PWEHLvox7[{^vC/">
                                                           <field name="OP">LTE</field>
                                                           <value name="A">
                                                             <block type="variables_get" id="UMGtz$8FdLn$UI.16[x~">
                                                               <field name="VAR" id="]QNA]6mC/m=YN4#MWOV;">AT</field>
                                                             </block>
                                                           </value>
                                                           <value name="B">
                                                             <block type="math_number" id="_Lr^dK)2G$G6:5kDZr$i">
                                                               <field name="NUM">10</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <statement name="DO1">
                                                         <block type="variables_set" id="j;#V?VF`YpCQ1Vb:)lRh">
                                                           <field name="VAR" id="4RnZsx32p9:0WHh7`},t">delay</field>
                                                           <value name="VALUE">
                                                             <block type="math_number" id="Ps!:-r=^6O!3S[5HNB7B">
                                                               <field name="NUM">240000</field>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="controls_if" id="7(`:L+{N]{].;E+P.,@S">
                                                               <mutation else="1"></mutation>
                                                               <value name="IF0">
                                                                 <block type="logic_operation" id=":?@RSP_6Q.SYS+ZqJJh%" inline="false">
                                                                   <field name="OP">OR</field>
                                                                   <value name="A">
                                                                     <block type="logic_compare" id="Q5=s:p4=)8?2*:*#d0.y">
                                                                       <field name="OP">LT</field>
                                                                       <value name="A">
                                                                         <block type="time_get" id="@7tjj^UH(#}i9Y5EY9ng">
                                                                           <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                                           <field name="OPTION">MM/DD</field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="B">
                                                                         <block type="text" id="I%^*a//jYR.p7V=zUzUX">
                                                                           <field name="TEXT">05/15</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                   <value name="B">
                                                                     <block type="logic_compare" id="C(?5-W9G@!g@M/x%lxp;">
                                                                       <field name="OP">GT</field>
                                                                       <value name="A">
                                                                         <block type="time_get" id="7[vKmoB[@NtR3JxRd]Xl">
                                                                           <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                                           <field name="OPTION">MM/DD</field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="B">
                                                                         <block type="text" id="aI_R$L%#vAU+U_)+H|)W">
                                                                           <field name="TEXT">09/15</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <statement name="DO0">
                                                                 <block type="variables_set" id="|.)G53.BF3{J#.^{a9(k">
                                                                   <field name="VAR" id="!$%d@O83Ka[rhkXU1dP%">repeat</field>
                                                                   <value name="VALUE">
                                                                     <block type="math_number" id="ibH)+0UQz;q9s;`C}lb3">
                                                                       <field name="NUM">60000</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </statement>
                                                               <statement name="ELSE">
                                                                 <block type="variables_set" id="[hQM8-;0{iiSL6a:-fy(">
                                                                   <field name="VAR" id="!$%d@O83Ka[rhkXU1dP%">repeat</field>
                                                                   <value name="VALUE">
                                                                     <block type="math_number" id="@At+{TPJ,(xKssf|n?IV">
                                                                       <field name="NUM">120000</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </statement>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </statement>
                                                       <value name="IF2">
                                                         <block type="logic_operation" id="K;uBksX-9W)(!zT=DPiY" inline="false">
                                                           <field name="OP">AND</field>
                                                           <value name="A">
                                                             <block type="logic_compare" id="2):ua8WrKEeCt%w}MAm[">
                                                               <field name="OP">GTE</field>
                                                               <value name="A">
                                                                 <block type="time_get" id="ST6$IL$C*cxKugv*n^iE">
                                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                                   <field name="OPTION">MM/DD</field>
                                                                 </block>
                                                               </value>
                                                               <value name="B">
                                                                 <block type="text" id="_3$0pj0VX$}tTp3Xp=~V">
                                                                   <field name="TEXT">05/15</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <value name="B">
                                                             <block type="logic_compare" id="VV+!c;L6^mAcli#6f8E9">
                                                               <field name="OP">LTE</field>
                                                               <value name="A">
                                                                 <block type="time_get" id="98v/1N.z,S},713lB#-T">
                                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                                   <field name="OPTION">MM/DD</field>
                                                                 </block>
                                                               </value>
                                                               <value name="B">
                                                                 <block type="text" id="{VbSpg9UMWQ-%@dAcG3`">
                                                                   <field name="TEXT">09/15</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <statement name="DO2">
                                                         <block type="variables_set" id="$fj59$g5mU*jvefM=~;J">
                                                           <field name="VAR" id="4RnZsx32p9:0WHh7`},t">delay</field>
                                                           <value name="VALUE">
                                                             <block type="math_number" id="8mpUp26-WiPV*b0*aR!$">
                                                               <field name="NUM">420000</field>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="variables_set" id="yfNt0[oDzsM~gy3pMAN5">
                                                               <field name="VAR" id="!$%d@O83Ka[rhkXU1dP%">repeat</field>
                                                               <value name="VALUE">
                                                                 <block type="math_number" id="b2!_?f}l2#jM78L%+,Ff">
                                                                   <field name="NUM">120000</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </statement>
                                                       <statement name="ELSE">
                                                         <block type="variables_set" id="M^sgq0.rPEYJ:8!_Ia9^">
                                                           <field name="VAR" id="4RnZsx32p9:0WHh7`},t">delay</field>
                                                           <value name="VALUE">
                                                             <block type="math_number" id="Mxi[:X|2aeD91).yYPP=">
                                                               <field name="NUM">300000</field>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="variables_set" id="v@Osj]RCiX_N7wj*(^O$">
                                                               <field name="VAR" id="!$%d@O83Ka[rhkXU1dP%">repeat</field>
                                                               <value name="VALUE">
                                                                 <block type="math_number" id="-?*Onrmxf?^XT@sH-jWd">
                                                                   <field name="NUM">120000</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </statement>
                                                       <next>
                                                         <block type="variables_set" id="l]+}}cza!:;?O8*cuXZF">
                                                           <field name="VAR" id="zL[s}0F!ZKt(|[4;3urB">erinnern</field>
                                                           <value name="VALUE">
                                                             <block type="math_round" id="RZJdjb-`N4.^Mh6]/{Uf">
                                                               <field name="OP">ROUND</field>
                                                               <value name="NUM">
                                                                 <shadow type="math_number" id=";UPHSL?Orhu^Kc,|n2b~">
                                                                   <field name="NUM">3.1</field>
                                                                 </shadow>
                                                                 <block type="math_arithmetic" id="NWuTZur)MNxjn)~_9/}L">
                                                                   <field name="OP">DIVIDE</field>
                                                                   <value name="A">
                                                                     <shadow type="math_number" id="fKLma,i_EPR5fi/r2[/Y">
                                                                       <field name="NUM">1</field>
                                                                     </shadow>
                                                                     <block type="math_arithmetic" id="J58k|`S:;]al4q2P8RxG">
                                                                       <field name="OP">ADD</field>
                                                                       <value name="A">
                                                                         <shadow type="math_number" id="fPS,[8PfV0RIJfPiy,?n">
                                                                           <field name="NUM">1</field>
                                                                         </shadow>
                                                                         <block type="variables_get" id="F~phPOa`ia=(ziw:M^nC">
                                                                           <field name="VAR" id="4RnZsx32p9:0WHh7`},t">delay</field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="B">
                                                                         <shadow type="math_number" id="a__g(Wn$8Pi$}OvlZxK+">
                                                                           <field name="NUM">1</field>
                                                                         </shadow>
                                                                         <block type="variables_get" id="*84MvqKAh-Qad:l@WS(X">
                                                                           <field name="VAR" id="!$%d@O83Ka[rhkXU1dP%">repeat</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                   <value name="B">
                                                                     <shadow type="math_number" id="[JzwiX?%5-J895veMWB,">
                                                                       <field name="NUM">60000</field>
                                                                     </shadow>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="control" id=".rCb{,2-p;zUV*ybaKm@">
                                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                               <field name="OID">Object ID</field>
                                                               <field name="WITH_DELAY">FALSE</field>
                                                               <value name="VALUE">
                                                                 <block type="math_number" id="qr}?YyDWka?}ITSZPg_5">
                                                                   <field name="NUM">100</field>
                                                                 </block>
                                                               </value>
                                                               <next>
                                                                 <block type="control" id="hOBpBB5X?nVIo1WOlS69">
                                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                                   <field name="OID">Object ID</field>
                                                                   <field name="WITH_DELAY">TRUE</field>
                                                                   <field name="DELAY_MS">1</field>
                                                                   <field name="UNIT">sec</field>
                                                                   <field name="CLEAR_RUNNING">FALSE</field>
                                                                   <value name="VALUE">
                                                                     <block type="text_join" id="W5UGwFSs|Z}94U2;G_W{">
                                                                       <mutation items="5"></mutation>
                                                                       <value name="ADD0">
                                                                         <block type="text" id="Aaz()#nr)(NTp+=G?YF|">
                                                                           <field name="TEXT">Es hat gerade </field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="ADD1">
                                                                         <block type="variables_get" id="dfLE|1K#LVxI6M=]:QX{">
                                                                           <field name="VAR" id="]QNA]6mC/m=YN4#MWOV;">AT</field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="ADD2">
                                                                         <block type="text" id="53aPK/=@M.a}W;1D%=hL">
                                                                           <field name="TEXT"> Grad Außentemperatur Erinnerung in </field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="ADD3">
                                                                         <block type="variables_get" id="M]uv~p1KB)`@`;9$4DF[">
                                                                           <field name="VAR" id="zL[s}0F!ZKt(|[4;3urB">erinnern</field>
                                                                         </block>
                                                                       </value>
                                                                       <value name="ADD4">
                                                                         <block type="text" id="6yAI%}L8/H^[@[5z,``t">
                                                                           <field name="TEXT"> Minutem</field>
                                                                         </block>
                                                                       </value>
                                                                     </block>
                                                                   </value>
                                                                   <next>
                                                                     <block type="timeouts_settimeout" id="/=/=Tqkdv2di8u3:0=$C">
                                                                       <field name="NAME">timeout</field>
                                                                       <field name="DELAY">delay</field>
                                                                       <field name="UNIT">ms</field>
                                                                       <statement name="STATEMENT">
                                                                         <block type="timeouts_setinterval" id="}UNdg8kz$Mh:1w_Lo/V=">
                                                                           <field name="NAME">Intervall</field>
                                                                           <field name="INTERVAL">repeat</field>
                                                                           <field name="UNIT">ms</field>
                                                                           <statement name="STATEMENT">
                                                                             <block type="control" id="(.$AUzO6a?iL0yhke@@g">
                                                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                               <field name="OID">Object ID</field>
                                                                               <field name="WITH_DELAY">FALSE</field>
                                                                               <value name="VALUE">
                                                                                 <block type="text" id="ZZeLK=Ll)Q{}i,5Bj?_M">
                                                                                   <field name="TEXT">Badfenster wieder schließen</field>
                                                                                 </block>
                                                                               </value>
                                                                             </block>
                                                                           </statement>
                                                                         </block>
                                                                       </statement>
                                                                     </block>
                                                                   </next>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </statement>
                                                 </block>
                                               </next>
                                             </block>
                                           </statement>
                                           <statement name="ELSE">
                                             <block type="timeouts_cleartimeout" id="4FBrkRD9H2hh@0;$oWub">
                                               <field name="NAME">timeout</field>
                                               <next>
                                                 <block type="timeouts_clearinterval" id="y(K.(`/O@^Yn$4IHIVrq">
                                                   <field name="NAME">Intervall</field>
                                                 </block>
                                               </next>
                                             </block>
                                           </statement>
                                         </block>
                                       </statement>
                                     </block>
                                    </xml>
                                    

                                    Bild_2022-02-09_153325.png

                                    1 Reply Last reply Reply Quote 1
                                    • L
                                      LaBamba @LaBamba last edited by

                                      @paul53
                                      Das wahr anscheinend irgendwie nicht das Ganze.

                                      var timeout, Intervall, timeout11, Intervall11, timeout12, Intervall12, timeout13, Intervall13, timeout14, Intervall14, timeout15, Intervall15, timeout16, Intervall16, timeout17, Intervall17, timeout18, Intervall18, timeout19, Intervall19, timeout20, Intervall20, timeout21, Intervall21, timeout22, Intervall22, timeout24, Intervall24;
                                      
                                      
                                      // <=5
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 5) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 4 Minuten'].join('')), 1000, false);
                                          timeout = setTimeout(async function () {
                                            Intervall = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 60000);
                                          }, 180000);
                                        } else {
                                          (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                                          (function () {if (Intervall) {clearInterval(Intervall); Intervall = null;}})();
                                        }
                                      });
                                      // >5-<=10
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '09/15' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 5 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 10) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 6 Minuten'].join('')), 1000, false);
                                          timeout11 = setTimeout(async function () {
                                            Intervall11 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 240000);
                                        } else {
                                          (function () {if (timeout11) {clearTimeout(timeout11); timeout11 = null;}})();
                                          (function () {if (Intervall11) {clearInterval(Intervall11); Intervall11 = null;}})();
                                        }
                                      });
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") < '05/15' && formatDate(new Date(), "MM/DD") > '09/15' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 5 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 10) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 5 Minuten'].join('')), 1000, false);
                                          timeout12 = setTimeout(async function () {
                                            Intervall12 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 60000);
                                          }, 240000);
                                        } else {
                                          (function () {if (timeout12) {clearTimeout(timeout12); timeout12 = null;}})();
                                          (function () {if (Intervall12) {clearInterval(Intervall12); Intervall12 = null;}})();
                                        }
                                      });
                                      // >10-<=15
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '15/09' && compareTime('00:00', '09:30', "between", null) && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 10 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 15) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 12 Minuten'].join('')), 1000, false);
                                          timeout13 = setTimeout(async function () {
                                            Intervall13 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 600000);
                                        } else {
                                          (function () {if (timeout13) {clearTimeout(timeout13); timeout13 = null;}})();
                                          (function () {if (Intervall13) {clearInterval(Intervall13); Intervall13 = null;}})();
                                        }
                                      });
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '15/09' && compareTime('9:31', '23:59', "between", null) && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 10 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 15) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 9 Minuten'].join('')), 1000, false);
                                          timeout14 = setTimeout(async function () {
                                            Intervall14 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 420000);
                                        } else {
                                          (function () {if (timeout14) {clearTimeout(timeout14); timeout14 = null;}})();
                                          (function () {if (Intervall14) {clearInterval(Intervall14); Intervall14 = null;}})();
                                        }
                                      });
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") < '05/15' && formatDate(new Date(), "MM/DD") > '15/09' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 10 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val <= 15) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 7 Minuten'].join('')), 1000, false);
                                          timeout15 = setTimeout(async function () {
                                            Intervall15 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 300000);
                                        } else {
                                          (function () {if (timeout15) {clearTimeout(timeout15); timeout15 = null;}})();
                                          (function () {if (Intervall15) {clearInterval(Intervall15); Intervall15 = null;}})();
                                        }
                                      });
                                      // >15-<=19
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '15/09' && compareTime('00:00', '09:30', "between", null) && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 15 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val < 19) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 18 Minuten'].join('')), 1000, false);
                                          timeout16 = setTimeout(async function () {
                                            Intervall16 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 180000);
                                          }, 900000);
                                        } else {
                                          (function () {if (timeout16) {clearTimeout(timeout16); timeout16 = null;}})();
                                          (function () {if (Intervall16) {clearInterval(Intervall16); Intervall16 = null;}})();
                                        }
                                      });
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '15/09' && compareTime('09:31', '23:59', "between", null) && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 15 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val < 19) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 13 Minuten'].join('')), 1000, false);
                                          timeout17 = setTimeout(async function () {
                                            Intervall17 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 180000);
                                          }, 600000);
                                        } else {
                                          (function () {if (timeout17) {clearTimeout(timeout17); timeout17 = null;}})();
                                          (function () {if (Intervall17) {clearInterval(Intervall17); Intervall17 = null;}})();
                                        }
                                      });
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") < '05/15' && formatDate(new Date(), "MM/DD") > '15/09' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val > 15 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val < 19) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 10 Minuten'].join('')), 1000, false);
                                          timeout18 = setTimeout(async function () {
                                            Intervall18 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 480000);
                                        } else {
                                          (function () {if (timeout18) {clearTimeout(timeout18); timeout18 = null;}})();
                                          (function () {if (Intervall18) {clearInterval(Intervall18); Intervall18 = null;}})();
                                        }
                                      });
                                      // >19
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '15/09' && compareTime('00:00', '09:30', "between", null) && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val >= 19 && getState("daswetter.0.NextHours.Location_1.Day_1.current.temp_value").val < getState("hm-rpc.0.000C98A9A4C756.1.ACTUAL_TEMPERATURE").val) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 16 Minuten'].join('')), 1000, false);
                                          timeout19 = setTimeout(async function () {
                                            Intervall19 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 240000);
                                          }, 720000);
                                        } else {
                                          (function () {if (timeout19) {clearTimeout(timeout19); timeout19 = null;}})();
                                          (function () {if (Intervall19) {clearInterval(Intervall19); Intervall19 = null;}})();
                                        }
                                      });
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '15/09' && compareTime('09:31', '23:59', "between", null) && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val >= 19 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val < getState("hm-rpc.0.000C98A9A4C756.1.ACTUAL_TEMPERATURE").val) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 10 Minuten'].join('')), 1000, false);
                                          timeout20 = setTimeout(async function () {
                                            Intervall20 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 480000);
                                        } else {
                                          (function () {if (timeout20) {clearTimeout(timeout20); timeout20 = null;}})();
                                          (function () {if (Intervall20) {clearInterval(Intervall20); Intervall20 = null;}})();
                                        }
                                      });
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") < '05/15' && formatDate(new Date(), "MM/DD") > '09/15' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val >= 19 && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val < getState("hm-rpc.0.000C98A9A4C756.1.ACTUAL_TEMPERATURE").val) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Erinnerung nach 10 Minuten'].join('')), 1000, false);
                                          timeout21 = setTimeout(async function () {
                                            Intervall21 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 480000);
                                        } else {
                                          (function () {if (timeout21) {clearTimeout(timeout21); timeout21 = null;}})();
                                          (function () {if (Intervall21) {clearInterval(Intervall21); Intervall21 = null;}})();
                                        }
                                      });
                                      // >Innenraumtemperatur
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") >= '05/15' && formatDate(new Date(), "MM/DD") <= '09/15' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val >= getState("hm-rpc.0.000C98A9A4C756.1.ACTUAL_TEMPERATURE").val) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Vorsicht, die Außentemperatur ist höher als die Innentemperatur','Erinnerung nach 6 Minuten'].join('')), 1000, false);
                                          timeout22 = setTimeout(async function () {
                                            Intervall22 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 240000);
                                        } else {
                                          (function () {if (timeout22) {clearTimeout(timeout22); timeout22 = null;}})();
                                          (function () {if (Intervall22) {clearInterval(Intervall22); Intervall22 = null;}})();
                                        }
                                      });
                                      on({id: "zigbee.0.00158d0003a4845d.opened"/*Badfenster ist geöffnet!*/, change: "ne"}, async function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if (getState("zigbee.0.00158d0003a4845d.opened").val == true && formatDate(new Date(), "MM/DD") < '05/15' && formatDate(new Date(), "MM/DD") > '09/15' && getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val >= getState("hm-rpc.0.000C98A9A4C756.1.ACTUAL_TEMPERATURE").val) {
                                          setState("shelly.0.SHSW-25#687E4F#1.Shutter.Position"/*Position*/, 100);
                                          setStateDelayed("alexa2.0.Echo-Devices.G090P308817300CQ.Commands.announcement"/*announcement*/, (['Es hat gerade',getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val,'Grad Außentemperatur','Vorsicht, die Außentemperatur ist höher als die Innentemperatur','Erinnerung nach 8 Minuten'].join('')), 1000, false);
                                          timeout24 = setTimeout(async function () {
                                            Intervall24 = setInterval(async function () {
                                              setState("alexa2.0.Echo-Devices.G2A1A6031035033H.Commands.announcement"/*announcement*/, ('Bitte das Badfenster wieder schließen'));
                                            }, 120000);
                                          }, 360000);
                                        } else {
                                          (function () {if (timeout24) {clearTimeout(timeout24); timeout24 = null;}})();
                                          (function () {if (Intervall24) {clearInterval(Intervall24); Intervall24 = null;}})();
                                        }
                                      });
                                      
                                      getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val;
                                      
                                      getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val;
                                      
                                      getState("viessmannapi.0.1288346.0.features.heating.sensors.temperature.outside.properties.value.value").val;
                                      
                                      paul53 1 Reply Last reply Reply Quote 0
                                      • paul53
                                        paul53 @LaBamba last edited by

                                        @labamba sagte: Das wahr anscheinend irgendwie nicht das Ganze.

                                        Das Blockly um die Raumtemperatur zu erweitern, schaffst Du selbst?

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

                                          @paul53
                                          Probiere es mal, so fit bin ich da auch nicht.
                                          Die Variablen für die Uhrzeit bei höheren Temperaturen sind da schon schwieriger.

                                          Zudem glaube ich, dass der Übergang des Datums aktuelle Zeit <05/15 und >09/15 nicht funktioniert. Hat in meinem Skript schon nicht geklappt.

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

                                            @labamba sagte: Übergang des Datums aktuelle Zeit <05/15 und >09/15 nicht funktioniert. Hat in meinem Skript schon nicht geklappt.

                                            Du hast es auch per UND verknüpft, ich per ODER.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            825
                                            Online

                                            32.0k
                                            Users

                                            80.5k
                                            Topics

                                            1.3m
                                            Posts

                                            2
                                            33
                                            883
                                            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