Ich hab ebenfalls diesen Weg mit meiner CCU2 und den Xiaomi Aqara Sensoren gewählt und mit Blockly ein Script am laufen, welches die Thermostate runterregelt beim öffnen bzw. wieder auf den Heizwert bringt der eingestellt ist.
Ist ein Script für zwei Heizkörper und zwei Fenster/Balkontür, wo jeweils "abgefragt" wird ob eines der beiden Fenster/Balkontür offen ist um versehentliches heizen vermieden wird sobald eines geschlossne wird.
Hänge dir mal das Blockly Script an, musst du nur noch anpassen.
Code
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="on_ext" id="N/dV2N-rQx.Q|%VOHK4K" x="37" y="13">
<mutation items="2"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="n=w(*I5vxamsyNdFE=c+">
<field name="oid">mihome.0.devices.magnet_158d0002c8d3d9.state</field>
</shadow>
</value>
<value name="OID1">
<shadow type="field_oid" id="8vM{,H|Ua{o[!ORTMtJf">
<field name="oid">mihome.0.devices.magnet_158d0002e6de7c.state</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="q@*MD.=Qlg}!(Ig6?Nn/">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_operation" id="i@dG|#XYYw4PPv^7Wye/">
<field name="OP">OR</field>
<value name="A">
<block type="logic_compare" id="C-2F~aeO|I7#~^/aho84">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="Yh_3zG)zRq`8jb,Vz;0s">
<field name="ATTR">val</field>
<field name="OID">mihome.0.devices.magnet_158d0002c8d3d9.state</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="C,.RMZ@rCHfcPPG2-TSJ">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="*1-/AwCCe@wWPPG04ClU">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="d#7@`O*_%vT?.]eGYNS^">
<field name="ATTR">val</field>
<field name="OID">mihome.0.devices.magnet_158d0002e6de7c.state</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="Xuv[#`j2a~#=M@{mm=V5">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="timeouts_settimeout" id="`%2}3*0N1!U^G]{9QJCa">
<field name="NAME">Timeout1</field>
<field name="DELAY">3</field>
<field name="UNIT">sec</field>
<statement name="STATEMENT">
<block type="control" id="WryXZLjxc#7yt2}Cv=Ky">
<mutation delay_input="false"></mutation>
<field name="OID">hm-rpc.0.MEQ0795110.4.SET_TEMPERATURE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id=":TEkDEj-bb#4N:WL@;xV">
<field name="NUM">10</field>
</block>
</value>
<next>
<block type="control" id="=W87!tIF%2lxH;;%b(,3">
<mutation delay_input="false"></mutation>
<field name="OID">hm-rpc.0.MEQ0795118.4.SET_TEMPERATURE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="TNY]hV{*[`=U6][Fsq.L">
<field name="NUM">10</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</statement>
<value name="IF1">
<block type="logic_operation" id="j,o2#%CvyuuaIlNeHAEx">
<field name="OP">OR</field>
<value name="A">
<block type="logic_compare" id="Vjte8q;pFk*OmKnJ*#?P">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="3fGFm/32Z7W3TfYH8_#M">
<field name="ATTR">val</field>
<field name="OID">mihome.0.devices.magnet_158d0002c8d3d9.state</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="o5NtCD#^WmA49y%oEEj[">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
<value name="B">
<block type="logic_compare" id="jvvOgt1D7g1/Qs4`#(X(">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="{!U=6mjo^slQ1ocXUKE:">
<field name="ATTR">val</field>
<field name="OID">mihome.0.devices.magnet_158d0002e6de7c.state</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="UzTn_NMe}F}V9Og@3qE{">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="tCh|s}wfI/VM,~hC@9-L">
<mutation delay_input="false"></mutation>
<field name="OID">hm-rpc.0.MEQ0795110.4.SET_TEMPERATURE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="3[o{=K[;q2wcn]E55i!;">
<field name="NUM">21</field>
</block>
</value>
<next>
<block type="control" id="sJr:J^%tRF:Qc3op-eum">
<mutation delay_input="false"></mutation>
<field name="OID">hm-rpc.0.MEQ0795118.4.SET_TEMPERATURE</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="WYcsh@mBeCH,)@DdKg(/">
<field name="NUM">21</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</xml>
Display More
Gruß Migo