NEWS
Szenen Anlegen und durchschalten. Geht es eleganter?
-
Hi,
so schalten wir das Schlafzimmer durch. Wir haben Szenen angelegt, die durchgeschaltet werden.

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="S4kqSec@m|:m3,KQJX0k">modus</variable> </variables> <block type="procedures_defnoreturn" id="H7~5opJ.fFEf+|1?oqh[" x="887" y="-38"> <field name="NAME">M1_WenigLicht</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="!{zq*DaXMo1jesH#OI$-"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="`Y@9ee);an[+Z,1_1C)D"> <field name="TEXT">DB7C1D</field> </block> </value> <next> <block type="control" id="dTEnmr,$41FzplC:OA$t"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="*IhhH-pS,3xq?X/a6TBw"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="variables_set" id="aoWjk9vkp.FAAxHh;A]C" x="37" y="13"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="k%s)28N{GAWlD;I5nEHh"> <field name="NUM">0</field> </block> </value> <next> <block type="on_ext" id="Y?TE!26NflqB|sW[L-pr"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=",#Gi/@A2eTU{2AX6Tlqt"> <field name="oid">zigbee.0.8c6fb9fffe642632.on</field> </shadow> </value> <value name="OID1"> <shadow type="field_oid" id="l;V%/ICM9F]f^;QO=}oG"> <field name="oid">zigbee.0.8c6fb9fffe642632.off</field> </shadow> </value> <statement name="STATEMENT"> <block type="control" id="gzeW8j(2RT-i|A~zBe*D"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.transition_time</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="IAp!99NK1fr7|S+`}|L,"> <field name="NUM">1</field> </block> </value> <next> <block type="controls_if" id="yM:N=,x%}@_~ICl%haSM"> <value name="IF0"> <block type="get_value" id="iBO.Gw|zgN(.W753)X#U"> <field name="ATTR">val</field> <field name="OID">zigbee.0.8c6fb9fffe642632.on</field> </block> </value> <statement name="DO0"> <block type="math_change" id=",tI3YBDmtMH=~b@WG/BC"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="DELTA"> <shadow type="math_number" id=";T8y[qx#ac.@gioE/HZm"> <field name="NUM">1</field> </shadow> </value> <next> <block type="procedures_callnoreturn" id="oWgO/sN68p|v_b5H.kln"> <mutation name="ModusEinstellen"></mutation> </block> </next> </block> </statement> <next> <block type="controls_if" id="K_xM{BUwEQ.J|J/*fw0R"> <value name="IF0"> <block type="get_value" id="5e1)Nm{@JjX;A@vinqo["> <field name="ATTR">val</field> <field name="OID">zigbee.0.8c6fb9fffe642632.off</field> </block> </value> <statement name="DO0"> <block type="procedures_callnoreturn" id="W%/~1vX?vKm8}0]a?KxK"> <mutation name="LangsamLichtAUS"></mutation> <next> <block type="variables_set" id="6Fu}PsdA=SO-I;}Z_f]m"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="bqjf3bE!yUcGsJFcx*:H"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> <block type="procedures_defnoreturn" id="yKO9Xd)*nf=O4_*J2^[6" x="487" y="13"> <field name="NAME">ModusEinstellen</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="controls_if" id="uE$cBA@,.4#x/MkFKf|V"> <mutation elseif="4"></mutation> <value name="IF0"> <block type="logic_compare" id="(1`Eq7=,xhF@v)M.TdMB"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="c(*uu2,|T%!7klAC:]UQ"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="jDgkn{.$5XY+B4)J8kss"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="MdwD}RKu}dd9*P+bhWKE"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="[M50^?7;o%[kq3Y|.90H"> <field name="NUM">0</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_compare" id="A/IeSw1,+mB[p8];x`Nh"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="1=BSHd_Y~2MwH;6j`.Ut"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="WsWS]+R-YP[!{Qg]x)3p"> <field name="NUM">1</field> </block> </value> </block> </value> <statement name="DO1"> <block type="procedures_callnoreturn" id="IH]h19Hj7X%/8:JzED8t"> <mutation name="M1_WenigLicht"></mutation> </block> </statement> <value name="IF2"> <block type="logic_compare" id="F3Uq((n#67j}.K2DlFly"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="^2fuvs2G*pPE@msWMdv2"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="13fpqtLA8WfLOgOdt4#s"> <field name="NUM">2</field> </block> </value> </block> </value> <statement name="DO2"> <block type="procedures_callnoreturn" id="xQB3*E1|4lE]$)P{d/]U"> <mutation name="M2_Liebe"></mutation> </block> </statement> <value name="IF3"> <block type="logic_compare" id="`8dTADnsr7pnGy5wT^j{"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="/8{uCsMF_2q#d*|i:X25"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="TF(02?:mmg,RFOb3Y.BI"> <field name="NUM">3</field> </block> </value> </block> </value> <statement name="DO3"> <block type="procedures_callnoreturn" id="J8JP~/DJ)x}W$AR^h;6("> <mutation name="M3_Blau"></mutation> </block> </statement> <value name="IF4"> <block type="logic_compare" id="9~;:%EjD:V8/a3Fzhk[O"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="#s-:dBPkP@zqW:iYXX[Z"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="GkiuIa:BqHRHh;ucycX9"> <field name="NUM">4</field> </block> </value> </block> </value> <statement name="DO4"> <block type="procedures_callnoreturn" id="%p,fz[.8`z~usi%ZG/Jn"> <mutation name="M4_AllesHell"></mutation> <next> <block type="variables_set" id="([m^s1?a!/JiJ#rBQFR3"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="Kr^d)uT}k~~}oP]|%.W8"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> <block type="procedures_defnoreturn" id="X/XiXKl%9N+Kt`6*g(/I" x="887" y="112"> <field name="NAME">M2_Liebe</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="FOerTwC:bt`_v1]1==_/"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="VJT9C!BnydQ57R!d%-;S"> <field name="TEXT">681111</field> </block> </value> <next> <block type="control" id="A_ztr+bbtev%r9?3Pb$E"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="3Se`fPP3]xJU7c_5um^u"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id="Gich}IWXj|!34glpse)i" x="887" y="263"> <field name="NAME">M3_Blau</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="g=LuHy11mUel3fA9GrL:"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="a|z=Whoyi#ei{b5nLxVN"> <field name="TEXT">0000FF</field> </block> </value> <next> <block type="control" id="cF#={+C9/%Co[UOoSHGb"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="S0WQPD1FZDo89_Mq6}wl"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id="RA^UN-hKl,(30|=[`WQ?" x="887" y="413"> <field name="NAME">M4_AllesHell</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="?*_XFWb(COZ*sU68IHzE"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="aQqT`RmeGk-ibKJw6Kx="> <field name="TEXT">FFFFFF</field> </block> </value> <next> <block type="control" id=";9X?`Lx{j?wSg)8r9b[p"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="1Fp/0Gf6~Mz;cI5g?DIh"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id=":vVG]N(##0|D3Xdd|aQd" x="887" y="562"> <field name="NAME">LangsamLichtAUS</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="Dk61F+HgZ*_,BsKo/4K5"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="QuefmaBxxU]i?x;eDK~B"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="d*)FRdyb{G;-=31GO(xk"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id=")FTvZ0%EPi._|1k1FdC5"> <field name="TEXT">DB7C1D</field> </block> </value> </block> </next> </block> </statement> </block> </xml>Frage
Geht das Ganze eleganter? Weil das jedes mal ganz schön viel Arbeit ist, dass so anzulegen. Wie mach ihr das? -
Hi,
so schalten wir das Schlafzimmer durch. Wir haben Szenen angelegt, die durchgeschaltet werden.

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="S4kqSec@m|:m3,KQJX0k">modus</variable> </variables> <block type="procedures_defnoreturn" id="H7~5opJ.fFEf+|1?oqh[" x="887" y="-38"> <field name="NAME">M1_WenigLicht</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="!{zq*DaXMo1jesH#OI$-"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="`Y@9ee);an[+Z,1_1C)D"> <field name="TEXT">DB7C1D</field> </block> </value> <next> <block type="control" id="dTEnmr,$41FzplC:OA$t"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="*IhhH-pS,3xq?X/a6TBw"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="variables_set" id="aoWjk9vkp.FAAxHh;A]C" x="37" y="13"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="k%s)28N{GAWlD;I5nEHh"> <field name="NUM">0</field> </block> </value> <next> <block type="on_ext" id="Y?TE!26NflqB|sW[L-pr"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=",#Gi/@A2eTU{2AX6Tlqt"> <field name="oid">zigbee.0.8c6fb9fffe642632.on</field> </shadow> </value> <value name="OID1"> <shadow type="field_oid" id="l;V%/ICM9F]f^;QO=}oG"> <field name="oid">zigbee.0.8c6fb9fffe642632.off</field> </shadow> </value> <statement name="STATEMENT"> <block type="control" id="gzeW8j(2RT-i|A~zBe*D"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.transition_time</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="IAp!99NK1fr7|S+`}|L,"> <field name="NUM">1</field> </block> </value> <next> <block type="controls_if" id="yM:N=,x%}@_~ICl%haSM"> <value name="IF0"> <block type="get_value" id="iBO.Gw|zgN(.W753)X#U"> <field name="ATTR">val</field> <field name="OID">zigbee.0.8c6fb9fffe642632.on</field> </block> </value> <statement name="DO0"> <block type="math_change" id=",tI3YBDmtMH=~b@WG/BC"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="DELTA"> <shadow type="math_number" id=";T8y[qx#ac.@gioE/HZm"> <field name="NUM">1</field> </shadow> </value> <next> <block type="procedures_callnoreturn" id="oWgO/sN68p|v_b5H.kln"> <mutation name="ModusEinstellen"></mutation> </block> </next> </block> </statement> <next> <block type="controls_if" id="K_xM{BUwEQ.J|J/*fw0R"> <value name="IF0"> <block type="get_value" id="5e1)Nm{@JjX;A@vinqo["> <field name="ATTR">val</field> <field name="OID">zigbee.0.8c6fb9fffe642632.off</field> </block> </value> <statement name="DO0"> <block type="procedures_callnoreturn" id="W%/~1vX?vKm8}0]a?KxK"> <mutation name="LangsamLichtAUS"></mutation> <next> <block type="variables_set" id="6Fu}PsdA=SO-I;}Z_f]m"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="bqjf3bE!yUcGsJFcx*:H"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> <block type="procedures_defnoreturn" id="yKO9Xd)*nf=O4_*J2^[6" x="487" y="13"> <field name="NAME">ModusEinstellen</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="controls_if" id="uE$cBA@,.4#x/MkFKf|V"> <mutation elseif="4"></mutation> <value name="IF0"> <block type="logic_compare" id="(1`Eq7=,xhF@v)M.TdMB"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="c(*uu2,|T%!7klAC:]UQ"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="jDgkn{.$5XY+B4)J8kss"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="MdwD}RKu}dd9*P+bhWKE"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="[M50^?7;o%[kq3Y|.90H"> <field name="NUM">0</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_compare" id="A/IeSw1,+mB[p8];x`Nh"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="1=BSHd_Y~2MwH;6j`.Ut"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="WsWS]+R-YP[!{Qg]x)3p"> <field name="NUM">1</field> </block> </value> </block> </value> <statement name="DO1"> <block type="procedures_callnoreturn" id="IH]h19Hj7X%/8:JzED8t"> <mutation name="M1_WenigLicht"></mutation> </block> </statement> <value name="IF2"> <block type="logic_compare" id="F3Uq((n#67j}.K2DlFly"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="^2fuvs2G*pPE@msWMdv2"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="13fpqtLA8WfLOgOdt4#s"> <field name="NUM">2</field> </block> </value> </block> </value> <statement name="DO2"> <block type="procedures_callnoreturn" id="xQB3*E1|4lE]$)P{d/]U"> <mutation name="M2_Liebe"></mutation> </block> </statement> <value name="IF3"> <block type="logic_compare" id="`8dTADnsr7pnGy5wT^j{"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="/8{uCsMF_2q#d*|i:X25"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="TF(02?:mmg,RFOb3Y.BI"> <field name="NUM">3</field> </block> </value> </block> </value> <statement name="DO3"> <block type="procedures_callnoreturn" id="J8JP~/DJ)x}W$AR^h;6("> <mutation name="M3_Blau"></mutation> </block> </statement> <value name="IF4"> <block type="logic_compare" id="9~;:%EjD:V8/a3Fzhk[O"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="#s-:dBPkP@zqW:iYXX[Z"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="GkiuIa:BqHRHh;ucycX9"> <field name="NUM">4</field> </block> </value> </block> </value> <statement name="DO4"> <block type="procedures_callnoreturn" id="%p,fz[.8`z~usi%ZG/Jn"> <mutation name="M4_AllesHell"></mutation> <next> <block type="variables_set" id="([m^s1?a!/JiJ#rBQFR3"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="Kr^d)uT}k~~}oP]|%.W8"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> <block type="procedures_defnoreturn" id="X/XiXKl%9N+Kt`6*g(/I" x="887" y="112"> <field name="NAME">M2_Liebe</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="FOerTwC:bt`_v1]1==_/"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="VJT9C!BnydQ57R!d%-;S"> <field name="TEXT">681111</field> </block> </value> <next> <block type="control" id="A_ztr+bbtev%r9?3Pb$E"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="3Se`fPP3]xJU7c_5um^u"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id="Gich}IWXj|!34glpse)i" x="887" y="263"> <field name="NAME">M3_Blau</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="g=LuHy11mUel3fA9GrL:"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="a|z=Whoyi#ei{b5nLxVN"> <field name="TEXT">0000FF</field> </block> </value> <next> <block type="control" id="cF#={+C9/%Co[UOoSHGb"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="S0WQPD1FZDo89_Mq6}wl"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id="RA^UN-hKl,(30|=[`WQ?" x="887" y="413"> <field name="NAME">M4_AllesHell</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="?*_XFWb(COZ*sU68IHzE"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="aQqT`RmeGk-ibKJw6Kx="> <field name="TEXT">FFFFFF</field> </block> </value> <next> <block type="control" id=";9X?`Lx{j?wSg)8r9b[p"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="1Fp/0Gf6~Mz;cI5g?DIh"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id=":vVG]N(##0|D3Xdd|aQd" x="887" y="562"> <field name="NAME">LangsamLichtAUS</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="Dk61F+HgZ*_,BsKo/4K5"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="QuefmaBxxU]i?x;eDK~B"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="d*)FRdyb{G;-=31GO(xk"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id=")FTvZ0%EPi._|1k1FdC5"> <field name="TEXT">DB7C1D</field> </block> </value> </block> </next> </block> </statement> </block> </xml>Frage
Geht das Ganze eleganter? Weil das jedes mal ganz schön viel Arbeit ist, dass so anzulegen. Wie mach ihr das?@dave83
Du könntest dir mal den Szenen Adapter anschauen?
Dort kreiert man Szenen die aus einer Ansammlung von Datenpunkten und Werten bestehen. Die kann man im Blockly dann einfach aktivieren oder deaktivieren.
https://github.com/ioBroker/ioBroker.scenes -
@black-falcon87 Wie installiert man das von dir verlinkte?
Oder gibt es hier im Forum dazu einenAnleitung und erste Beispiele?@dave83 sagte in Szenen Anlegen und durchschalten. Geht es eleganter?:
Wie installiert man das von dir verlinkte?
ganz normal wie jeden Adapter über den Admin
-
Hi,
so schalten wir das Schlafzimmer durch. Wir haben Szenen angelegt, die durchgeschaltet werden.

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="S4kqSec@m|:m3,KQJX0k">modus</variable> </variables> <block type="procedures_defnoreturn" id="H7~5opJ.fFEf+|1?oqh[" x="887" y="-38"> <field name="NAME">M1_WenigLicht</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="!{zq*DaXMo1jesH#OI$-"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="`Y@9ee);an[+Z,1_1C)D"> <field name="TEXT">DB7C1D</field> </block> </value> <next> <block type="control" id="dTEnmr,$41FzplC:OA$t"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="*IhhH-pS,3xq?X/a6TBw"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="variables_set" id="aoWjk9vkp.FAAxHh;A]C" x="37" y="13"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="k%s)28N{GAWlD;I5nEHh"> <field name="NUM">0</field> </block> </value> <next> <block type="on_ext" id="Y?TE!26NflqB|sW[L-pr"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id=",#Gi/@A2eTU{2AX6Tlqt"> <field name="oid">zigbee.0.8c6fb9fffe642632.on</field> </shadow> </value> <value name="OID1"> <shadow type="field_oid" id="l;V%/ICM9F]f^;QO=}oG"> <field name="oid">zigbee.0.8c6fb9fffe642632.off</field> </shadow> </value> <statement name="STATEMENT"> <block type="control" id="gzeW8j(2RT-i|A~zBe*D"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.transition_time</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="IAp!99NK1fr7|S+`}|L,"> <field name="NUM">1</field> </block> </value> <next> <block type="controls_if" id="yM:N=,x%}@_~ICl%haSM"> <value name="IF0"> <block type="get_value" id="iBO.Gw|zgN(.W753)X#U"> <field name="ATTR">val</field> <field name="OID">zigbee.0.8c6fb9fffe642632.on</field> </block> </value> <statement name="DO0"> <block type="math_change" id=",tI3YBDmtMH=~b@WG/BC"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="DELTA"> <shadow type="math_number" id=";T8y[qx#ac.@gioE/HZm"> <field name="NUM">1</field> </shadow> </value> <next> <block type="procedures_callnoreturn" id="oWgO/sN68p|v_b5H.kln"> <mutation name="ModusEinstellen"></mutation> </block> </next> </block> </statement> <next> <block type="controls_if" id="K_xM{BUwEQ.J|J/*fw0R"> <value name="IF0"> <block type="get_value" id="5e1)Nm{@JjX;A@vinqo["> <field name="ATTR">val</field> <field name="OID">zigbee.0.8c6fb9fffe642632.off</field> </block> </value> <statement name="DO0"> <block type="procedures_callnoreturn" id="W%/~1vX?vKm8}0]a?KxK"> <mutation name="LangsamLichtAUS"></mutation> <next> <block type="variables_set" id="6Fu}PsdA=SO-I;}Z_f]m"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="bqjf3bE!yUcGsJFcx*:H"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> </block> </next> </block> <block type="procedures_defnoreturn" id="yKO9Xd)*nf=O4_*J2^[6" x="487" y="13"> <field name="NAME">ModusEinstellen</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="controls_if" id="uE$cBA@,.4#x/MkFKf|V"> <mutation elseif="4"></mutation> <value name="IF0"> <block type="logic_compare" id="(1`Eq7=,xhF@v)M.TdMB"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="c(*uu2,|T%!7klAC:]UQ"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="jDgkn{.$5XY+B4)J8kss"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="MdwD}RKu}dd9*P+bhWKE"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="[M50^?7;o%[kq3Y|.90H"> <field name="NUM">0</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_compare" id="A/IeSw1,+mB[p8];x`Nh"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="1=BSHd_Y~2MwH;6j`.Ut"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="WsWS]+R-YP[!{Qg]x)3p"> <field name="NUM">1</field> </block> </value> </block> </value> <statement name="DO1"> <block type="procedures_callnoreturn" id="IH]h19Hj7X%/8:JzED8t"> <mutation name="M1_WenigLicht"></mutation> </block> </statement> <value name="IF2"> <block type="logic_compare" id="F3Uq((n#67j}.K2DlFly"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="^2fuvs2G*pPE@msWMdv2"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="13fpqtLA8WfLOgOdt4#s"> <field name="NUM">2</field> </block> </value> </block> </value> <statement name="DO2"> <block type="procedures_callnoreturn" id="xQB3*E1|4lE]$)P{d/]U"> <mutation name="M2_Liebe"></mutation> </block> </statement> <value name="IF3"> <block type="logic_compare" id="`8dTADnsr7pnGy5wT^j{"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="/8{uCsMF_2q#d*|i:X25"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="TF(02?:mmg,RFOb3Y.BI"> <field name="NUM">3</field> </block> </value> </block> </value> <statement name="DO3"> <block type="procedures_callnoreturn" id="J8JP~/DJ)x}W$AR^h;6("> <mutation name="M3_Blau"></mutation> </block> </statement> <value name="IF4"> <block type="logic_compare" id="9~;:%EjD:V8/a3Fzhk[O"> <field name="OP">GTE</field> <value name="A"> <block type="variables_get" id="#s-:dBPkP@zqW:iYXX[Z"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> </block> </value> <value name="B"> <block type="math_number" id="GkiuIa:BqHRHh;ucycX9"> <field name="NUM">4</field> </block> </value> </block> </value> <statement name="DO4"> <block type="procedures_callnoreturn" id="%p,fz[.8`z~usi%ZG/Jn"> <mutation name="M4_AllesHell"></mutation> <next> <block type="variables_set" id="([m^s1?a!/JiJ#rBQFR3"> <field name="VAR" id="S4kqSec@m|:m3,KQJX0k">modus</field> <value name="VALUE"> <block type="math_number" id="Kr^d)uT}k~~}oP]|%.W8"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> <block type="procedures_defnoreturn" id="X/XiXKl%9N+Kt`6*g(/I" x="887" y="112"> <field name="NAME">M2_Liebe</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="FOerTwC:bt`_v1]1==_/"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="VJT9C!BnydQ57R!d%-;S"> <field name="TEXT">681111</field> </block> </value> <next> <block type="control" id="A_ztr+bbtev%r9?3Pb$E"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="3Se`fPP3]xJU7c_5um^u"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id="Gich}IWXj|!34glpse)i" x="887" y="263"> <field name="NAME">M3_Blau</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="g=LuHy11mUel3fA9GrL:"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="a|z=Whoyi#ei{b5nLxVN"> <field name="TEXT">0000FF</field> </block> </value> <next> <block type="control" id="cF#={+C9/%Co[UOoSHGb"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="S0WQPD1FZDo89_Mq6}wl"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id="RA^UN-hKl,(30|=[`WQ?" x="887" y="413"> <field name="NAME">M4_AllesHell</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="?*_XFWb(COZ*sU68IHzE"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="aQqT`RmeGk-ibKJw6Kx="> <field name="TEXT">FFFFFF</field> </block> </value> <next> <block type="control" id=";9X?`Lx{j?wSg)8r9b[p"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="1Fp/0Gf6~Mz;cI5g?DIh"> <field name="NUM">100</field> </block> </value> </block> </next> </block> </statement> </block> <block type="procedures_defnoreturn" id=":vVG]N(##0|D3Xdd|aQd" x="887" y="562"> <field name="NAME">LangsamLichtAUS</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="control" id="Dk61F+HgZ*_,BsKo/4K5"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.brightness</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="QuefmaBxxU]i?x;eDK~B"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="d*)FRdyb{G;-=31GO(xk"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.group_3.color</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id=")FTvZ0%EPi._|1k1FdC5"> <field name="TEXT">DB7C1D</field> </block> </value> </block> </next> </block> </statement> </block> </xml>Frage
Geht das Ganze eleganter? Weil das jedes mal ganz schön viel Arbeit ist, dass so anzulegen. Wie mach ihr das?
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden
