Jetzt geht es, wie ich es mir wünsche.
Er schaltet die Szenen endlos durch, und wenn nach 4 Sekunden der erste Klick erst kommt dann ist die erste Szene "ausschalten".
Perfekt.
Und für andere Schalter kann ich das als Vorlage nehmen und beliebig viele Szenen ohne großen Umbau mit dazwischenschieben.
Vielen Dank für die Unterstützung, @cinimod!
jaaaaaa.png
Blocklycode:
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable id="!]2uNISp)(2z[:rRlh[K">Klicks</variable>
<variable type="timeout" id="timeout">timeout</variable>
</variables>
<block type="comment" id="K_L^@~T6I$hSAIs7?XvC" x="137" y="-38">
<field name="COMMENT">Szenenwechsel bei jedem Klick</field>
<next>
<block type="comment" id="r}C#a.(4@J{{9^.=8gn,">
<field name="COMMENT">Nach 4s Pause ist die 1. Szene "aus"</field>
<next>
<block type="variables_set" id="?hkjQ),jsEn.X!lMxKX6">
<field name="VAR" id="!]2uNISp)(2z[:rRlh[K">Klicks</field>
<value name="VALUE">
<block type="math_number" id="h!c7MtE0GCQ6qW#}?,hM">
<field name="NUM">0</field>
</block>
</value>
<next>
<block type="on_ext" id="%z~o_GT_v*/QON4]}DyG">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">gt</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="cJyG]hyC?jpbXC{2w-H7">
<field name="oid">zigbee2mqtt.0.0x001788010b036de3.left_press</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="math_change" id="Wk7j3Uy))Ts*J~0j9o}J">
<field name="VAR" id="!]2uNISp)(2z[:rRlh[K">Klicks</field>
<value name="DELTA">
<shadow type="math_number" id="pH{ZQBPxF$Ymr]`|~%#k">
<field name="NUM">1</field>
</shadow>
</value>
<next>
<block type="logic_switch_case" id="*Yw0V551#@)!/#kwuj~r">
<mutation xmlns="http://www.w3.org/1999/xhtml" case="2"></mutation>
<value name="CONDITION">
<block type="variables_get" id="^t*u(J5u5zkP*fN+{?L^">
<field name="VAR" id="!]2uNISp)(2z[:rRlh[K">Klicks</field>
</block>
</value>
<value name="CASECONDITION0">
<block type="math_number" id="tt-6$J5_,nG~C3Jj{|P0">
<field name="NUM">1</field>
</block>
</value>
<statement name="CASE0">
<block type="control" id="k$wBV%n@$xJVf.Tk!C2.">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">zigbee2mqtt.0.group_1.scene_3</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="+ds26DyFaBid},v;0$Q+">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="timeouts_cleartimeout" id="*~%aP=m0mIIZ6G*C(3@O">
<field name="NAME">timeout</field>
</block>
</next>
</block>
</statement>
<value name="CASECONDITION1">
<block type="math_number" id="gq)W,Y%FV3*c9D#qJI!b">
<field name="NUM">2</field>
</block>
</value>
<statement name="CASE1">
<block type="control" id="?/PIK82pBr#B?=-5RZK:">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">zigbee2mqtt.0.group_1.scene_0</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="3iz}eYh1qmWna-+F+gVu">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="timeouts_cleartimeout" id="uBqz1adGFjrEPJVN#Zru">
<field name="NAME">timeout</field>
</block>
</next>
</block>
</statement>
<value name="CASECONDITION2">
<block type="math_number" id="dO`jPL$5/r#4DB.$!7,I">
<field name="NUM">3</field>
</block>
</value>
<statement name="CASE2">
<block type="control" id="n8brd[emU1kh$`-e_vy,">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">zigbee2mqtt.0.group_1.scene_2</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="SdHJ8-Yz7Q[0`}6#~8hF">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="timeouts_cleartimeout" id="~z_Bx1J:!9rm!HX9xlDn">
<field name="NAME">timeout</field>
<next>
<block type="variables_set" id="JmNN.UbH8ldpJSUzeocn">
<field name="VAR" id="!]2uNISp)(2z[:rRlh[K">Klicks</field>
<value name="VALUE">
<block type="math_number" id="6fM}cu|D;$mUnja,5Fr?">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="comment" id="pymP8RHtohz./*K5Vr5M">
<field name="COMMENT">Ausschalten überspringen wenn schon aus</field>
<next>
<block type="timeouts_settimeout" id="FBl.gAm45o-wu}Ub^W^r">
<field name="NAME">timeout</field>
<field name="DELAY">4</field>
<field name="UNIT">sec</field>
<statement name="STATEMENT">
<block type="controls_if" id="}4/I$_H]fTOR/FmF]Cx)">
<mutation else="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="6K`%bre.I)Jc#@]=V=)V">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="EnB`x5NI_i?1-e_;=dP/">
<field name="ATTR">val</field>
<field name="OID">zigbee2mqtt.0.group_1.state</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="U4r!=;1Dub:b=2S41$S!">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="d]4B~qF#*K+]?$Wo@G52">
<field name="VAR" id="!]2uNISp)(2z[:rRlh[K">Klicks</field>
<value name="VALUE">
<block type="math_number" id="@1gR=FgW}`y]p|/`@?cQ">
<field name="NUM">0</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="]$dzxZ/Yl9G:TZT*!:uD">
<field name="VAR" id="!]2uNISp)(2z[:rRlh[K">Klicks</field>
<value name="VALUE">
<block type="math_number" id="1%W/vH`kWcoMO}ho8$bB">
<field name="NUM">1</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>