ich teste gerade die UI Rule und möchte eine Pushovernachricht bei einen Ereignis verschicken.
Das angegebene Gerät "Tom-Galaxys22" ist in Pushover angelegt. Doch warum erhalte ich beim Speichern der Rule den Fehler:
So sieht mein Code aus:Validation of rule dd49895eca has failed! Required input "device" of the condition "3" not connected
Code: Alles auswählen
configuration: {}
triggers:
- id: "1"
configuration:
itemName: KG_Abstell1_Feuchte
type: core.ItemStateUpdateTrigger
- id: "2"
configuration:
itemName: KG_Waschkueche_Feuchte
type: core.ItemStateUpdateTrigger
conditions:
- inputs: {}
id: "7"
configuration:
blockSource: <xml xmlns="https://developers.google.com/blockly/xml"><block
type="controls_if" id="|CI11RGC]Z_!!OUT6s$[" x="21" y="26"><value
name="IF0"><block type="logic_operation"
id="uYMw5o4sH7r}6xV-Y8um"><field name="OP">OR</field><value
name="A"><block type="logic_compare" id="_}%VrZ#d(C;u}y#@%Xr-"><field
name="OP">GTE</field><value name="A"><block type="oh_getitem_state"
id=",E.MA@2u?2f8e|@1pUa,"><value name="itemName"><shadow type="oh_item"
id=")fcHO82:xd*?qC;rGQcw"><mutation itemName="MyItem"
itemLabel="MyItem"></mutation><field
name="itemName">MyItem</field></shadow><block type="oh_item"
id="~u@}y5pt#E@POp$|W,kg"><mutation itemName="KG_Abstell1"
itemLabel="Abstellraum 1"></mutation><field
name="itemName">KG_Abstell1</field></block></value></block></value><value
name="B"><block type="oh_quantity_ext" id="IPZEio=GB8P^9cUzzL]s"><value
name="value"><shadow type="text" id="~ZWqHm2O}Gy_NmaSa7*n"><field
name="TEXT">10</field></shadow><block type="text"
id="j9mQ?}lY:qBryU:(;MFo"><field
name="TEXT">65</field></block></value><value name="unit"><shadow
type="text" id="_ivX}A[HQYn9p9q;1/Ns"><field
name="TEXT">W</field></shadow><block type="text"
id="BEz*ZwJ{_?}KNcI#7Kvg"><field
name="TEXT">%</field></block></value></block></value></block></value><value
name="B"><block type="logic_compare" id="bJMt7?QqD(rZ[5PuQ%-7"><field
name="OP">GTE</field><value name="A"><block type="oh_getitem_state"
id="}4[as}jM8VXzt+e$yAUN"><value name="itemName"><shadow type="oh_item"
id=")fcHO82:xd*?qC;rGQcw"><mutation itemName="MyItem"
itemLabel="MyItem"></mutation><field
name="itemName">MyItem</field></shadow><block type="oh_item"
id="#0NydKbm5C]S`Q+`jvOH"><mutation itemName="KG_Waschkueche"
itemLabel="Waschküche"></mutation><field
name="itemName">KG_Waschkueche</field></block></value></block></value><value
name="B"><block type="oh_quantity_ext" id="Zwae]cZzkfG?O;H.vUDQ"><value
name="value"><shadow type="text" id="~ZWqHm2O}Gy_NmaSa7*n"><field
name="TEXT">10</field></shadow><block type="text"
id="z*,xB395Ab$zj[LM0qvg"><field
name="TEXT">65</field></block></value><value name="unit"><shadow
type="text" id="_ivX}A[HQYn9p9q;1/Ns"><field
name="TEXT">W</field></shadow><block type="text"
id="PWh9rR2?WT2KV40y=2XD"><field
name="TEXT">%</field></block></value></block></value></block></value></block></value></block></xml>
type: application/javascript
script: >
if (items.getItem('KG_Abstell1').state >= Quantity('65' + '%') ||
items.getItem('KG_Waschkueche').state >= Quantity('65' + '%')) {
}
type: script.ScriptCondition
actions:
- id: "3"
configuration:
config: pushover:pushover-account:******
device: Tom-Galaxys22
message: TEST
type: pushover.sendMessageToDevice#*****
Was mache ich falsch?