@Kaiser-Franz-Josef
hier mal was einfaches
Blockly
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="on_ext" id="g@SDiyxr,4+?}Gr*3/#M" x="13" y="1303">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="zW1m0qyRn?{.@5%@pVak">
<field name="oid">harmony.0.Wohnzimmer.activities.Fernsehen</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="S%,5qiJYrE#DJSLMIKwM">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="DYXyr|^pwo@?@Mp8i`T_">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="2?=*]=up9y,8%4lUPn]k">
<field name="ATTR">val</field>
<field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field>
</block>
</value>
<value name="B">
<block type="math_number" id="y*s-]YzReywhg*}97s5Q">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="96vz;3tH)wR:kx8K`6o_">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hue.0.Fensterlampe.on</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="~Gu9sP;JP7mpC,JjGF=[">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="@w/bE~]uX~jYP#pm/:}!">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="57p#H_%^L?nYI$Bek;-h">
<field name="ATTR">val</field>
<field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field>
</block>
</value>
<value name="B">
<block type="math_number" id="Rj7K2]n!3b@e_O:!Gt#_">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="`%@U9+`ie=ZlF!27m#5w">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hue.0.Fensterlampe.on</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="E3A:?vmJdS*ONecg%n(8">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</xml>
Hier etwas kürzer, aber mit der gleichen Funktion
Blockly
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="on_ext" id="g@SDiyxr,4+?}Gr*3/#M" x="13" y="1303">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="zW1m0qyRn?{.@5%@pVak">
<field name="oid">harmony.0.Wohnzimmer.activities.Fernsehen</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="S%,5qiJYrE#DJSLMIKwM">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="DYXyr|^pwo@?@Mp8i`T_">
<field name="OP">EQ</field>
<value name="A">
<block type="on_source" id="B|!vuql4oXcm=gG5;A;=">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="y*s-]YzReywhg*}97s5Q">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="96vz;3tH)wR:kx8K`6o_">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hue.0.Fensterlampe.on</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="~Gu9sP;JP7mpC,JjGF=[">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="@w/bE~]uX~jYP#pm/:}!">
<field name="OP">EQ</field>
<value name="A">
<block type="on_source" id="wc0zW8Ykc%j,4/SJEwU^">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="Rj7K2]n!3b@e_O:!Gt#_">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="`%@U9+`ie=ZlF!27m#5w">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hue.0.Fensterlampe.on</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="E3A:?vmJdS*ONecg%n(8">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</xml>
Und wenn Du für alle activity die gleiche Aktion schalten willst, also nicht nur für eine activity, dann nimmst Du den current status
Blockly3
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="on_ext" id="g@SDiyxr,4+?}Gr*3/#M" x="13" y="1303">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="zW1m0qyRn?{.@5%@pVak">
<field name="oid">harmony.0.Wohnzimmer.activities.currentStatus</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="S%,5qiJYrE#DJSLMIKwM">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="DYXyr|^pwo@?@Mp8i`T_">
<field name="OP">EQ</field>
<value name="A">
<block type="on_source" id="B|!vuql4oXcm=gG5;A;=">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="y*s-]YzReywhg*}97s5Q">
<field name="NUM">2</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="96vz;3tH)wR:kx8K`6o_">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hue.0.Fensterlampe.on</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="~Gu9sP;JP7mpC,JjGF=[">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="@w/bE~]uX~jYP#pm/:}!">
<field name="OP">EQ</field>
<value name="A">
<block type="on_source" id="wc0zW8Ykc%j,4/SJEwU^">
<field name="ATTR">state.val</field>
</block>
</value>
<value name="B">
<block type="math_number" id="Rj7K2]n!3b@e_O:!Gt#_">
<field name="NUM">0</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="`%@U9+`ie=ZlF!27m#5w">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">hue.0.Fensterlampe.on</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="E3A:?vmJdS*ONecg%n(8">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</xml>
Vielleicht kommst Du jetzt damit zurecht.