Ich lasse mir mit diesem Script die Fertigmeldung auf Alexa ausgeben.
Den Verbrauch berechnet das Script in Euro und rundet das Ergebnis zweistellig nach dem Komma.
Code
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="on_ext" id="+A7wlutQO8gBfqosc.y3" x="-862" y="-287">
<mutation items="1"></mutation>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="L[i=p{|ii-ai*/YAZ@8s">
<field name="oid">sonoff.0.Trockner.ENERGY_Power</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="V6]e:v6u:?I_dnQ6L_VO">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="YL]^MiM0C_d90EjXd7qr">
<field name="OP">GT</field>
<value name="A">
<block type="get_value" id="yM=9zWrslsViHeXAVGm6">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Trockner.ENERGY_Power</field>
</block>
</value>
<value name="B">
<block type="text" id="H=g~S*6(?G/uCr~jDdCp">
<field name="TEXT">30</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="vs.J|^}}{M%%SJ1bpk;V">
<mutation delay_input="false"></mutation>
<field name="OID">Geräte.0.Bad.Trockner.Trockner_live</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="gvfoVV5t!!Us3^C~!w.H">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="math_change" id="SBLh=Mim:mdbdPJ2brk;">
<field name="VAR">AN Zähler</field>
<value name="DELTA">
<shadow type="math_number" id="_bAFr8Rp.jsiM{Zq32rY">
<field name="NUM">1</field>
</shadow>
</value>
<next>
<block type="variables_set" id="f0%C@g}jpwap#+s/Mo:N">
<field name="VAR">AUS Zähler</field>
<value name="VALUE">
<block type="math_number" id=")OvYfgj9cZ3]4:l~~Bb/">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="M~uV)}gj0R1:#*W8;u|_">
<field name="OP">LT</field>
<value name="A">
<block type="get_value" id=";C4ZX5Zy!7cKvi8im7j~">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Trockner.ENERGY_Power</field>
</block>
</value>
<value name="B">
<block type="text" id="qZr5=RgO[|.`JAG]=%:e">
<field name="TEXT">5</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="W@d-F3O_9HHWW#dCNkL=">
<mutation delay_input="false"></mutation>
<field name="OID">Geräte.0.Bad.Trockner.Trockner_live</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="A4H}`x`xaT~u.qw:OMjO">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="math_change" id="T.un5=.rdLl@woGn*4oJ">
<field name="VAR">AUS Zähler</field>
<value name="DELTA">
<shadow type="math_number" id="?c=pXLOc61v3AJP.(d:k">
<field name="NUM">1</field>
</shadow>
</value>
<next>
<block type="variables_set" id="]sQWt%s!E]?x=9/rY9s:">
<field name="VAR">AN Zähler</field>
<value name="VALUE">
<block type="math_number" id="k8~=Zl/`C|mA7b1LP*G=">
<field name="NUM">0</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="Fka;*|t}*-`SbqlH][O,">
<value name="IF0">
<block type="logic_compare" id="uvt{b:m0eZ!HIW|y{n=r">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="HW4-I|q*E8@T~3ORlH[6">
<field name="VAR">AN Zähler</field>
</block>
</value>
<value name="B">
<block type="math_number" id="7~MaZ@N]YyRp/S(nLXL.">
<field name="NUM">10</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="NHU;{f_J~TBqrHlE+l}U">
<mutation delay_input="false"></mutation>
<field name="OID">Geräte.0.Bad.Trockner.Trockner</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="NtK/XV38`3~}(+l-P,O4">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="control" id="Fhxkhe_}UfP0gi2/UFqx">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090L9117425089X.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="1yQVZ0+vqozZorL4-23#">
<field name="TEXT">Der Trockner läuft</field>
</block>
</value>
</block>
</next>
</block>
</statement>
<next>
<block type="controls_if" id="I5G5,xEQ9|pglEcLrxmF">
<value name="IF0">
<block type="logic_compare" id="%AbMO?J2D[f-rCEWyq=O">
<field name="OP">EQ</field>
<value name="A">
<block type="variables_get" id="u5FZNsypgs:pPUYsV1=g">
<field name="VAR">AUS Zähler</field>
</block>
</value>
<value name="B">
<block type="math_number" id="uaHP[P3wt-!h@M!UE]eX">
<field name="NUM">10</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="sj0ZAG=ELQ-|XeWmtEg3">
<mutation delay_input="false"></mutation>
<field name="OID">Geräte.0.Bad.Trockner.Trockner</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="eX|Bf{oW+%BAW.Y:)kbK">
<field name="BOOL">FALSE</field>
</block>
</value>
<next>
<block type="control" id="4Yg@cSHBoZgJ3XeTyw@j">
<mutation delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090L9117425089X.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text_join" id="f)(FWizA]rf:#@ybw?gE">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="text" id="517LI-;cv:YU:=!%%rfM">
<field name="TEXT">Der Trockner ist fertig, und hat heute insgesamt</field>
</block>
</value>
<value name="ADD1">
<block type="math_arithmetic" id="gaj})ATv)(n!.QB4%gRH">
<field name="OP">MULTIPLY</field>
<value name="A">
<shadow type="math_number" id="(^=1.F4iZfI/F=jpT(5r">
<field name="NUM">1</field>
</shadow>
<block type="math_round" id="8Ewx)I!oqGQX97Gv7;_Q">
<field name="OP">ROUND</field>
<value name="NUM">
<shadow type="math_number" id="l)^HSz{4`=P4.3FIH=9h">
<field name="NUM">3.1</field>
</shadow>
<block type="get_value" id="|F*m76:[-?E#Sx;fHPj)">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Trockner.ENERGY_Today</field>
</block>
</value>
</block>
</value>
<value name="B">
<shadow type="math_number" id="8S2a.+TFIUfm%eu~rp}Q">
<field name="NUM">0.27</field>
</shadow>
</value>
</block>
</value>
<value name="ADD2">
<block type="text" id="/h-9kplh.Q74i8N-|3^v">
<field name="TEXT"> Euro an Strom verbraucht.</field>
</block>
</value>
</block>
</value>
<next>
<block type="control" id="h),`Eds(Zd!M7;U/w#rQ">
<mutation delay_input="true"></mutation>
<field name="OID">alexa2.0.Echo-Devices.G090L9117425089X.Commands.speak</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">8</field>
<field name="UNIT">sec</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="text" id="QbcS0qrAu;_,^-VNi1~-">
<field name="TEXT">Du kannst den Trockner jetzt ausräumen</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</xml>
Alles anzeigen