Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Anwesenheitsliste erstellen lassen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Anwesenheitsliste erstellen lassen

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

      Hey ihr,

      ich versuche gerade ein kleines Spiel für Besucher zu basteln.
      Und zwar möchte ich, wenn mehr als 3 Personen im Haushalt sind, stündliche eine der anwesenden Personen ausgewählt und eine Aufgabe zugewiesen bekommt.

      Aktuell werden bereits anwesende Personen erfasst und bekommen den Wert "1" zugewiesen.

      chrome_TxlJ7Ecy17.jpg

      Jetzt soll halt eine Liste erstellt werden der Namen die den Wert 1 haben. Und daraus soll dann einer zufällig ausgewählt werden.

      Hab mal ein wenig rumprobiert aber komme nicht weiter. Hab es mit dem ID Selektor probiert, aber das ganze klappt so nicht.

      chrome_7WDoqcp0Jz.jpg

      Wie bekomme ich das nun am einfachsten hin? Es werden ja auch ab und an mal neue Personen als Objekt hinzugefügt und die sollen dann ja auch direkt erfasst werden. Ist da der ID Selektor die richtige Wahl überhaupt? Ich habe auch bereits eine Funktion mit dem Namen "Casino" hinzugefügt.

      Vielen lieben Dank

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

        @alyxabyss richtig wäre im ID-Selektor - unabhängig davon dass Du Enums erstellt hast und diese nicht nutzt:

        0_userdata.0.jemand_zuhause.*
        

        wenn Dein Verzeichnis stimmt.

        Besser wäre aber:

        https://www.smarthome-tricks.de/software-iobroker/blockly-mit-dem-id-selektor-auf-veraenderungen-reagieren/

        Ein Beispiel, aber da siehst Du schon den Fehler in Deinem ID-Selektor-Blockly.

        1 Reply Last reply Reply Quote 1
        • paul53
          paul53 @AlyxAbyss last edited by paul53

          @alyxabyss sagte: neue Personen als Objekt hinzugefügt und die sollen dann ja auch direkt erfasst werden.

          Das funktioniert nur mit einem RegExp-Trigger, etwa so:

          Bild_2023-01-02_133521784.png

          @alyxabyss sagte in Anwesenheitsliste erstellen lassen:

          anwesende Personen erfasst und bekommen den Wert "1" zugewiesen.

          Hoffentlich als Zahl und nicht als String?

          A 1 Reply Last reply Reply Quote 1
          • A
            AlyxAbyss @paul53 last edited by AlyxAbyss

            @paul53

            Das sieht ja schon einmal ganz gut aus. Werde es mal so probieren. Gebe dann nochmal Rückmeldung. Vielen Dank

            Und ja, als Zahl und nicht als String. 🙂

            UPDATE:

            Scheint prima zu klappen bisher. Es ist noch nicht fertig. Paar Dinge will ich noch ändern. Aktuell spuckt das Script zum testen alle 5 Minuten eine Aufgabe aus.

            So sieht es im Moment aus:

            chrome_Ws2nBr5Zas.jpg

            <xml xmlns="https://developers.google.com/blockly/xml">
              <variables>
                <variable id=",?Xu?w8h3YG(pN_jaKZz">Aufgaben</variable>
                <variable id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</variable>
                <variable id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</variable>
                <variable id="Jc$I3tA{;pL)@5)SX5|Z">id</variable>
                <variable id="D]mhPHrwYAB9BqVF578C">anwesend</variable>
                <variable id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</variable>
                <variable id="+1T2TNmWxLg;Gj|^AX+^">AktuelleAufgabe</variable>
              </variables>
              <block type="on_ext" id="`8bB6WHwMG}a@IAd}P9A" x="-587" y="637">
                <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                <field name="CONDITION">any</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id="Hjo]Kx)l[eN!bqNe?=ts">
                    <field name="oid">default</field>
                  </shadow>
                  <block type="regex" id="~%|^h8VmkucMbKi~-#t+">
                    <field name="TEXT">0_userdata.0.jemand_zuhause.*</field>
                  </block>
                </value>
                <statement name="STATEMENT">
                  <block type="controls_if" id="y*Fot:/!7.M(TxuwtYaJ">
                    <value name="IF0">
                      <block type="logic_compare" id="l-lZU`kd:VS?V#%qd*2n">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="lists_indexOf" id="]lf^]tuzjJ2T3v%wm_w!">
                            <field name="END">FIRST</field>
                            <value name="VALUE">
                              <block type="variables_get" id="}sxQ[:2$l+mKMeMAL~X;">
                                <field name="VAR" id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</field>
                              </block>
                            </value>
                            <value name="FIND">
                              <block type="on_source" id="W3-nz./+h_[U%sbVB7CN">
                                <field name="ATTR">id</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="_;yWIrq1/{@)f3G:]bz}">
                            <field name="NUM">0</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="lists_setIndex" id="5L,n2u4gG_DamVUJZ`X0">
                        <mutation at="false"></mutation>
                        <field name="MODE">INSERT</field>
                        <field name="WHERE">LAST</field>
                        <value name="LIST">
                          <block type="variables_get" id="YL4IO@?YO%.5hef=I#VG">
                            <field name="VAR" id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</field>
                          </block>
                        </value>
                        <value name="TO">
                          <block type="on_source" id="Jq@OkL9uSY}[uT$Kz,HN">
                            <field name="ATTR">id</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                  </block>
                </statement>
                <next>
                  <block type="schedule" id="$mMEX5M{`2I0t%44=o+{">
                    <field name="SCHEDULE">0,5,10,15,20,25,30,35,40,45,50,55 * * * *</field>
                    <statement name="STATEMENT">
                      <block type="variables_set" id="jB5Hlu)zH+G3UH|*:UQb">
                        <field name="VAR" id=",?Xu?w8h3YG(pN_jaKZz">Aufgaben</field>
                        <value name="VALUE">
                          <block type="lists_create_with" id="v%gAaV0?t:aI_7k^oW(q">
                            <mutation items="3"></mutation>
                            <value name="ADD0">
                              <block type="text" id="fVK]gx6F{?55e}6-l.3o">
                                <field name="TEXT">darf heute die Spülmaschine ein und ausräumen</field>
                              </block>
                            </value>
                            <value name="ADD1">
                              <block type="text" id="TCd=rKeFx[6_^z-kX9E}">
                                <field name="TEXT">darf heute Wäsche wäschen</field>
                              </block>
                            </value>
                            <value name="ADD2">
                              <block type="text" id="Qd1(sFb0ycU1?%I/,k)F">
                                <field name="TEXT">darf heute den Tisch abräumen</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="4c=JVVc)JGbt`o:95W+-">
                            <field name="VAR" id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</field>
                            <value name="VALUE">
                              <block type="selector" id="F*2rPlAepLQn(9Y9^U_H">
                                <field name="TEXT">0_userdata.0.jemand_zuhause.*</field>
                              </block>
                            </value>
                            <next>
                              <block type="debug" id="G-:5?Nd/(.5f/v/KY8e$">
                                <field name="Severity">error</field>
                                <value name="TEXT">
                                  <shadow type="text" id="Kf-N~*Xr(+.%t)qAB)se">
                                    <field name="TEXT">test</field>
                                  </shadow>
                                  <block type="text" id="qct/tmk8-mvm5beIL^Mp">
                                    <field name="TEXT">Gleich wird ein neues Opfer gewählt</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="control" id="pLUq}udCUc=vJN#IW9G4">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.Casino.Statusmeldung</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="text" id="S8?.@oiC*]z[[ve]6oG}">
                                        <field name="TEXT">Gleich wird ein neues Opfer auserwählt</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="control" id="yE[zWIV/qr$.Y#dwrQJY">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">0_userdata.0.Casino.LetzteAufgabe</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="get_value" id="5kVu[bHWj`0FV0f/poSp">
                                            <field name="ATTR">val</field>
                                            <field name="OID">0_userdata.0.Casino.AktuelleAufgabe</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="mrG(({AG-Y/0~zn|AuJo">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">0_userdata.0.Casino.LetztesUpdate</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="time_get" id="CiH(qptbid{[/^*1DxLN">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                                <field name="OPTION">hh:mm</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="T,TM[0!0r6se`LA|Ag9(">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">0_userdata.0.Casino.AktuelleAufgabe</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="text" id="zQq952}QL)05~[CE11X_">
                                                    <field name="TEXT">Eine neue Aufgabe wird erstellt!</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="control" id="D9%Ie`I*.n]f1GZo?PZ[">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">0_userdata.0.Casino.Pechvogel</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="text" id="K0c-}{C,$Hw3MR8|s+B9">
                                                        <field name="TEXT">Kommt gleich</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="timeouts_wait" id="FoJo8gKr5m{MR]2imV9X">
                                                        <field name="DELAY">1</field>
                                                        <field name="UNIT">min</field>
                                                        <next>
                                                          <block type="variables_set" id="/2M~7E~}M~q]ey4ouYs!">
                                                            <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field>
                                                            <value name="VALUE">
                                                              <block type="lists_create_with" id="hDX4w}EN2Jf5?_!(vGwK">
                                                                <mutation items="0"></mutation>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="controls_forEach" id="#3=2m5fs,bC)u![pDZ+p">
                                                                <field name="VAR" id="Jc$I3tA{;pL)@5)SX5|Z">id</field>
                                                                <value name="LIST">
                                                                  <block type="variables_get" id="e{I^l|?WDn%J+$`+6rUN">
                                                                    <field name="VAR" id="x}OT@fLk`w}@z#4TKXw|">Teilnehmer</field>
                                                                  </block>
                                                                </value>
                                                                <statement name="DO">
                                                                  <block type="controls_if" id="XBo;d98++,b50A0(b}QD">
                                                                    <value name="IF0">
                                                                      <block type="get_value_var" id="$Xt~BO!qj_.W*oo?eKsr">
                                                                        <field name="ATTR">val</field>
                                                                        <value name="OID">
                                                                          <shadow type="text" id="wXDEr00Vn{R.BI][o`G^">
                                                                            <field name="TEXT"></field>
                                                                          </shadow>
                                                                          <block type="variables_get" id="bHNaVjH5`x?%d.c,{n`q">
                                                                            <field name="VAR" id="Jc$I3tA{;pL)@5)SX5|Z">id</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <statement name="DO0">
                                                                      <block type="variables_set" id="/)W[*-pWs~v4mNWGF34}">
                                                                        <field name="VAR" id="D]mhPHrwYAB9BqVF578C">anwesend</field>
                                                                        <value name="VALUE">
                                                                          <block type="lists_split" id="LMP)|`x;$|ODmCxf0t%w">
                                                                            <mutation mode="SPLIT"></mutation>
                                                                            <field name="MODE">SPLIT</field>
                                                                            <value name="INPUT">
                                                                              <block type="variables_get" id="SxN`Aw~9#FcnlHvmOLY(">
                                                                                <field name="VAR" id="Jc$I3tA{;pL)@5)SX5|Z">id</field>
                                                                              </block>
                                                                            </value>
                                                                            <value name="DELIM">
                                                                              <shadow type="text" id="O+Z~C+_.;Yo!!(uza#+U">
                                                                                <field name="TEXT">.</field>
                                                                              </shadow>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                        <next>
                                                                          <block type="variables_set" id="a!#v(qEh17_I1a5FsE;n">
                                                                            <field name="VAR" id="D]mhPHrwYAB9BqVF578C">anwesend</field>
                                                                            <value name="VALUE">
                                                                              <block type="lists_getIndex" id="l8l2Xg?6tF99A23`1^`%">
                                                                                <mutation statement="false" at="false"></mutation>
                                                                                <field name="MODE">GET</field>
                                                                                <field name="WHERE">LAST</field>
                                                                                <value name="VALUE">
                                                                                  <block type="variables_get" id=";0(?,T+JL!Fk={hXmdWy">
                                                                                    <field name="VAR" id="D]mhPHrwYAB9BqVF578C">anwesend</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <next>
                                                                              <block type="lists_setIndex" id="AD/0:`7_?k}$g@^n=Q6R">
                                                                                <mutation at="false"></mutation>
                                                                                <field name="MODE">INSERT</field>
                                                                                <field name="WHERE">LAST</field>
                                                                                <value name="LIST">
                                                                                  <block type="variables_get" id="Jx~S82pS1e(]bicY*h4p">
                                                                                    <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field>
                                                                                  </block>
                                                                                </value>
                                                                                <value name="TO">
                                                                                  <block type="variables_get" id="+RF5rIR*xat3W%mt6T@d">
                                                                                    <field name="VAR" id="D]mhPHrwYAB9BqVF578C">anwesend</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </statement>
                                                                  </block>
                                                                </statement>
                                                                <next>
                                                                  <block type="debug" id="2KM,P9$BFrz?lu9Vs`mF">
                                                                    <field name="Severity">error</field>
                                                                    <value name="TEXT">
                                                                      <shadow type="text" id="0S?il;W[1W+@)foq)EpY">
                                                                        <field name="TEXT">test</field>
                                                                      </shadow>
                                                                      <block type="text_join" id=",t_@kIf]H=F=sMV(Ee(*">
                                                                        <mutation items="2"></mutation>
                                                                        <value name="ADD0">
                                                                          <block type="text" id="rBgNCn9_QH+]s^7#@;6d">
                                                                            <field name="TEXT">Teilnehmer: </field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="ADD1">
                                                                          <block type="variables_get" id="wvPI;Scs(4M*sQ^j*(xC">
                                                                            <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="controls_if" id="aK3?8eaYt9U#q9UZdHM5">
                                                                        <mutation elseif="1"></mutation>
                                                                        <value name="IF0">
                                                                          <block type="logic_compare" id="sVcY$zdXfY)95ruuio`/">
                                                                            <field name="OP">GT</field>
                                                                            <value name="A">
                                                                              <block type="lists_length" id="Fc}]Zn-s}!HTElRr=Cc%">
                                                                                <value name="VALUE">
                                                                                  <block type="variables_get" id="5TbR8t~[:P8d3xU+.9wg">
                                                                                    <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <value name="B">
                                                                              <block type="math_number" id="-Ky$Le@s9v5Px0tfskOz">
                                                                                <field name="NUM">2</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                        <statement name="DO0">
                                                                          <block type="variables_set" id="zc(Zq83|`Kpn2M}=@|9#">
                                                                            <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field>
                                                                            <value name="VALUE">
                                                                              <block type="lists_getIndex" id="XG%RqvxRDse^(W]R(P7j">
                                                                                <mutation statement="false" at="false"></mutation>
                                                                                <field name="MODE">GET</field>
                                                                                <field name="WHERE">RANDOM</field>
                                                                                <value name="VALUE">
                                                                                  <block type="variables_get" id="GK*,F_mCte||(z9o-rq^">
                                                                                    <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <next>
                                                                              <block type="variables_set" id="),n8Fkk_,OCM;r5)no)W">
                                                                                <field name="VAR" id="+1T2TNmWxLg;Gj|^AX+^">AktuelleAufgabe</field>
                                                                                <value name="VALUE">
                                                                                  <block type="lists_getIndex" id="Xvl|K|Z6dOB$tX#[FxAR">
                                                                                    <mutation statement="false" at="false"></mutation>
                                                                                    <field name="MODE">GET</field>
                                                                                    <field name="WHERE">RANDOM</field>
                                                                                    <value name="VALUE">
                                                                                      <block type="variables_get" id="Y,qe@Rhe1#4t%Uj4ZNEJ">
                                                                                        <field name="VAR" id=",?Xu?w8h3YG(pN_jaKZz">Aufgaben</field>
                                                                                      </block>
                                                                                    </value>
                                                                                  </block>
                                                                                </value>
                                                                                <next>
                                                                                  <block type="control" id="UCwqHhRvZi)C%zV.D4L}">
                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                    <field name="OID">0_userdata.0.Casino.Teilnehmer</field>
                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                    <value name="VALUE">
                                                                                      <block type="convert_tostring" id="C0=|Lk04Q7;CExnJxaOJ">
                                                                                        <value name="VALUE">
                                                                                          <block type="variables_get" id="6l@;8]XSjJ^HO=P)Pc#s">
                                                                                            <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </value>
                                                                                    <next>
                                                                                      <block type="debug" id="5PELc|^!OF5UZ;-j*|~U">
                                                                                        <field name="Severity">error</field>
                                                                                        <value name="TEXT">
                                                                                          <shadow type="text">
                                                                                            <field name="TEXT">test</field>
                                                                                          </shadow>
                                                                                          <block type="text_join" id="$wwuqz~V$VqFwfqA9{Yy">
                                                                                            <mutation items="2"></mutation>
                                                                                            <value name="ADD0">
                                                                                              <block type="text" id="Hp:1}1SuU`3R7~5}I1;E">
                                                                                                <field name="TEXT">Pechvogel: </field>
                                                                                              </block>
                                                                                            </value>
                                                                                            <value name="ADD1">
                                                                                              <block type="variables_get" id="R`F@#[@%Xa.gmEyDb;%o">
                                                                                                <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </value>
                                                                                        <next>
                                                                                          <block type="control" id="s0d*wwa@bHa~0jX,%k|f">
                                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                            <field name="OID">0_userdata.0.Casino.Pechvogel</field>
                                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                                            <value name="VALUE">
                                                                                              <block type="variables_get" id="qFWhs)$1go2?$w3RFzNo">
                                                                                                <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field>
                                                                                              </block>
                                                                                            </value>
                                                                                            <next>
                                                                                              <block type="debug" id="o*gYm_/-lJK(7#u7x8e3">
                                                                                                <field name="Severity">error</field>
                                                                                                <value name="TEXT">
                                                                                                  <shadow type="text" id="i=Du-dGO]?((MUvAxF*4">
                                                                                                    <field name="TEXT">test</field>
                                                                                                  </shadow>
                                                                                                  <block type="text_join" id="laG5#F1Ju9JSm1Py8l4`">
                                                                                                    <mutation items="3"></mutation>
                                                                                                    <value name="ADD0">
                                                                                                      <block type="variables_get" id=";z[2K|,}(~t3jhuML=a,">
                                                                                                        <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="ADD1">
                                                                                                      <block type="text" id="_B@Xz#F@$):H[@3-!dFA">
                                                                                                        <field name="TEXT"> </field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <value name="ADD2">
                                                                                                      <block type="variables_get" id="N5y_H[M{wOv_8i}J,hyb">
                                                                                                        <field name="VAR" id="+1T2TNmWxLg;Gj|^AX+^">AktuelleAufgabe</field>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <next>
                                                                                                  <block type="control" id="9z+PsIXRojwS+4uA[$|z">
                                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                    <field name="OID">0_userdata.0.Casino.AktuelleAufgabe</field>
                                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                                    <value name="VALUE">
                                                                                                      <block type="text_join" id="MZ}*9b.*_jdmH+dcBfw`">
                                                                                                        <mutation items="3"></mutation>
                                                                                                        <value name="ADD0">
                                                                                                          <block type="variables_get" id="o8JKg/d7!ZGH.u8)8usj">
                                                                                                            <field name="VAR" id="S:_)2m$]2E?r.C=4N(sg">Pechvogel</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <value name="ADD1">
                                                                                                          <block type="text" id="U0*|,~!el7GdW?1~IZ,H">
                                                                                                            <field name="TEXT"> </field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <value name="ADD2">
                                                                                                          <block type="variables_get" id="=kYAMKkW=WxbbaKwLbI(">
                                                                                                            <field name="VAR" id="+1T2TNmWxLg;Gj|^AX+^">AktuelleAufgabe</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                      </block>
                                                                                                    </value>
                                                                                                    <next>
                                                                                                      <block type="debug" id="`jolVPHE8FMaiq:odO2i">
                                                                                                        <field name="Severity">error</field>
                                                                                                        <value name="TEXT">
                                                                                                          <shadow type="text">
                                                                                                            <field name="TEXT">test</field>
                                                                                                          </shadow>
                                                                                                          <block type="text" id="pbpE-vB3l;kmN=#r9yb,">
                                                                                                            <field name="TEXT">Ein neues Opfer wurde auserwählt.</field>
                                                                                                          </block>
                                                                                                        </value>
                                                                                                        <next>
                                                                                                          <block type="control" id="I{M@5`~0E96;!yMs;JW{">
                                                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                            <field name="OID">0_userdata.0.Casino.Statusmeldung</field>
                                                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                                                            <value name="VALUE">
                                                                                                              <block type="text" id="C8jn2u1!L=;prVu}6OJw">
                                                                                                                <field name="TEXT">Ein neues Opfer wurde auserwählt.</field>
                                                                                                              </block>
                                                                                                            </value>
                                                                                                            <next>
                                                                                                              <block type="timeouts_wait" id="e?]Mjca[DB:$loJYay=x">
                                                                                                                <field name="DELAY">1</field>
                                                                                                                <field name="UNIT">min</field>
                                                                                                                <next>
                                                                                                                  <block type="control" id="ob3r/`fU@8iK%@7umHrJ">
                                                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                                                    <field name="OID">0_userdata.0.Casino.Statusmeldung</field>
                                                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                                                    <value name="VALUE">
                                                                                                                      <block type="text" id="nHWp+Y|D*!3!~Zr8%w1E">
                                                                                                                        <field name="TEXT">Ich hoffe ihr habt Spaß</field>
                                                                                                                      </block>
                                                                                                                    </value>
                                                                                                                  </block>
                                                                                                                </next>
                                                                                                              </block>
                                                                                                            </next>
                                                                                                          </block>
                                                                                                        </next>
                                                                                                      </block>
                                                                                                    </next>
                                                                                                  </block>
                                                                                                </next>
                                                                                              </block>
                                                                                            </next>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </statement>
                                                                        <value name="IF1">
                                                                          <block type="logic_compare" id="j:rH;)[}?z=8+cJNy%lA">
                                                                            <field name="OP">LTE</field>
                                                                            <value name="A">
                                                                              <block type="lists_length" id="D:A+@uHtN$Kp0+O$]FW)">
                                                                                <value name="VALUE">
                                                                                  <block type="variables_get" id="c}^O%ql}V=@k;gi)~I5l">
                                                                                    <field name="VAR" id="Ia,|RT_2b!,%B8-#+kA=">Anwesende</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <value name="B">
                                                                              <block type="math_number" id="0??En=C%-!^lQL7;K,q6">
                                                                                <field name="NUM">2</field>
                                                                              </block>
                                                                            </value>
                                                                          </block>
                                                                        </value>
                                                                        <statement name="DO1">
                                                                          <block type="control" id="eJo(15+}ApC^x|0l|8nH">
                                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                            <field name="OID">0_userdata.0.Casino.Teilnehmer</field>
                                                                            <field name="WITH_DELAY">FALSE</field>
                                                                            <value name="VALUE">
                                                                              <block type="text" id="k1.@dutHXtepnG/f,#E.">
                                                                                <field name="TEXT">-</field>
                                                                              </block>
                                                                            </value>
                                                                            <next>
                                                                              <block type="control" id="GDO_JByzNKgvGO3)B8Zn">
                                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                <field name="OID">0_userdata.0.Casino.Pechvogel</field>
                                                                                <field name="WITH_DELAY">FALSE</field>
                                                                                <value name="VALUE">
                                                                                  <block type="text" id="ND,@H4?1K,R%us!?85i/">
                                                                                    <field name="TEXT">-</field>
                                                                                  </block>
                                                                                </value>
                                                                                <next>
                                                                                  <block type="control" id="po@r1J%;m([T~3P{h/*r">
                                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                    <field name="OID">0_userdata.0.Casino.Statusmeldung</field>
                                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                                    <value name="VALUE">
                                                                                      <block type="text" id="n/sPm;:EdpQgK}[k6FP5">
                                                                                        <field name="TEXT">Leider gibt es in dieser Runde zu wenige Teilnehmer</field>
                                                                                      </block>
                                                                                    </value>
                                                                                    <next>
                                                                                      <block type="control" id="E%C+{Ln;n?c?_6C=jrfV">
                                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                                        <field name="OID">0_userdata.0.Casino.AktuelleAufgabe</field>
                                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                                        <value name="VALUE">
                                                                                          <block type="text" id="bsKP0Yo7d5`!!jy!Zi#%">
                                                                                            <field name="TEXT">Such dir Freunde</field>
                                                                                          </block>
                                                                                        </value>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </statement>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </xml>
            

            Jetzt hatte ich die Idee, dass es 2 Aufgabenlisten geben soll. Eine mit Haushaltsaufgaben und eine mit lustigen Aufgaben. Mal soll eine Spaßaufgabe erscheinen und mal eine Haushaltsaufgabe. Entweder löse ich das mit einem Zeittrigger, dass jeweils ne andere Liste verwendet wird. Oder es darf auch ruhig zufällig entschieden werden.

            Es wäre dann natürlich super wenn jede Aufgabe auch aus der Liste gestrichen wird, sobald sie am heutigen Tag schon einmal erschienen ist.

            Hab bisher noch nicht so oft mit Listen gearbeitet. Wie könnte ich das nun realisieren?

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

            Support us

            ioBroker
            Community Adapters
            Donate

            586
            Online

            32.0k
            Users

            80.5k
            Topics

            1.3m
            Posts

            3
            4
            363
            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