@Martin-0 sagte in Wiederholen von Befehlen. Wie geht das:
Da muss ich ja garnicht jedesmal den Befehl überall reinschreiben, sondern kann das benennen und dann einfügen
Da der Ansagetext überall gleich ist, habe ich eine Variante mit Variable erstellt.
Spoiler
<xml xmlns="http://www.w3.org/1999/xhtml">
<variables>
<variable type="" id="B:u)*5n*7e-b$$/6xA5S">ansage</variable>
<variable type="undefined" id="timeout">timeout</variable>
</variables>
<block type="schedule" id="I4$lt{y={6ktxUOFUAUp" x="-1412" y="-262">
<field name="SCHEDULE">{"time":{"exactTime":true,"start":"23:00"},"period":{"days":1}}</field>
<statement name="STATEMENT">
<block type="controls_if" id="+5B75]y|H0xaV^k}nzN#">
<value name="IF0">
<block type="logic_compare" id=":g^t/wOP@Eyn8Ps}y*;:">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="K[j1v-@LyMurc%MVd:Qj">
<field name="ATTR">val</field>
<field name="OID">hm-rpc.0.JEQ0068443.1.STATE</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="CGp0Xup1{gaa=LN-p)V">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="procedures_callnoreturn" id="w4~^`UYw#c/AZ16*;^2/">
<mutation name="ansagen"></mutation>
<next>
<block type="timeouts_settimeout" id="^MQc)RrII$IK?vh7[oBh">
<field name="NAME">timeout</field>
<field name="DELAY">15</field>
<field name="UNIT">sec</field>
<statement name="STATEMENT">
<block type="procedures_callnoreturn" id="j8Oy$h)lMTDBgfh%5,uK">
<mutation name="ansagen"></mutation>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
<block type="procedures_defnoreturn" id="y~$bl!}zW6vkdw}!z!~Q" x="-1013" y="-137">
<field name="NAME">ansagen</field>
<comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
<statement name="STACK">
<block type="variables_set" id="W|IJXCI4558gbk(A5N9B">
<field name="VAR" id="B:u)*5n*7e-b$$/6xA5S" variabletype="">ansage</field>
<value name="VALUE">
<block type="text" id="{AiP(D{1D[#^P@^BYu3">
<field name="TEXT">Sicherheitswarnung. Das Garagentor ist noch geöffnet</field>
</block>
</value>
<next>
<block type="comment" id="CazBpF8s^39B=V2!u|(P">
<field name="COMMENT">Echo Wohnzimmer</field>
<next>
<block type="controls_if" id="hZ~V,z25PwxAgScWkEG5">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="}V^09Y3*p=0?g^!t8WIn">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="a+yjeHL8Bq.Gw,Ooru">
<field name="ATTR">val</field>
<field name="OID">alexa2.0.Echo-Devices.G090U509847625MD.Bluetooth.3db393472f177440184a264d10ab21eaa3a40b727da721dacafdc36d7c924828.connected</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="iL;.^qKRI/EvT__-ijX0">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="o1v=umqvl[o$Cv|;f]S-">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U509847625MD.Commands.speak-volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="vY5vPPdyzFj-q_dcX/ZN">
<field name="NUM">100</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="control" id="M%o@@T68jp?jm4shN%!b">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U509847625MD.Commands.speak-volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="ZGA8#%bU^)/:!Ez8L7T(">
<field name="NUM">80</field>
</block>
</value>
</block>
</statement>
<next>
<block type="control" id="bof(^Kc6*HkP+s:j[6#_">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U509847625MD.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="*DQWI2k9B|SkYa/74okS">
<field name="VAR" id="B:u)*5n*7e-b$$/6xA5S" variabletype="">ansage</field>
</block>
</value>
<next>
<block type="comment" id="})*dm=K.%!t}u%{{lOOo">
<field name="COMMENT">Echo Badezimmer</field>
<next>
<block type="control" id="=Bdy1/j[B-XGezQyz^hF">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U50984653CEF.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="E?5h:!sz7m8*ji%it%A)">
<field name="VAR" id="B:u)*5n*7e-b$$/6xA5S" variabletype="">ansage</field>
</block>
</value>
<next>
<block type="comment" id="I7D#-CK31A(.9PL{OIrS">
<field name="COMMENT">Echo Wintergarten rechts</field>
<next>
<block type="control" id="N-z_H{7CHOH?f6BF_fBH">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U50991860QSL.Commands.speak-volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="Kd3~Ov)}hdWwo7Gvfc+[">
<field name="NUM">50</field>
</block>
</value>
<next>
<block type="control" id="T8r(PQcs.=m8,Z37N;-y">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U50991860QSL.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="=kAFSjZsN4M?M0I0-31x">
<field name="VAR" id="B:u)*5n*7e-b$$/6xA5S" variabletype="">ansage</field>
</block>
</value>
<next>
<block type="comment" id="h7VHm$s|m_^_/_nyScx.">
<field name="COMMENT">Echo Werkstatt</field>
<next>
<block type="control" id="YEdU^w}S1+:gN%81VAQ@">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090XG07930531PU.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="yx%~c34X+TwOxqzY`Dyx">
<field name="VAR" id="B:u)*5n*7e-b$$/6xA5S" variabletype="">ansage</field>
</block>
</value>
<next>
<block type="comment" id="F1(av/Fq.7jObTX.yG[">
<field name="COMMENT">Echo Schlafzimmer</field>
<next>
<block type="control" id="Nj@c?9:P,d?puaw0vMfz">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U50784360US6.Commands.speak-volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="3_!yO=%_o^`B!)]y2EI)">
<field name="NUM">40</field>
</block>
</value>
<next>
<block type="control" id="J?BofaiaB2V!fQ$cGc3^">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090U50784360US6.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="variables_get" id="/!$YP$T$bnrp5d[a}x,|">
<field name="VAR" id="B:u)*5n*7e-b$$/6xA5S" variabletype="">ansage</field>
</block>
</value>
</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>
</next>
</block>
</statement>
</block>
</xml>
Ist "Commands.speak-volume" tatsächlich ein String-Datenpunkt oder ein Zahl-Datenpunkt ?