|
发表于 2023-11-23 17:11:46
|
显示全部楼层
本帖最后由 PerryLayne 于 2023-11-23 21:39 编辑
楼主大佬你好,我只做了一层判定,但是为什么会有两个输出结果呢。有点难受影响我的进一步操作,想请教一下
[{"id":"b2e5ac8bf6230131","type":"function","z":"9b1b2d22cbe00b98","name":"门窗为关","func":"if (msg.payload == 'off') {\n msg.payload = true;\n}\nelse {\n msg.payload = false;\n}\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":1580,"wires":[["2ccdbd6a64425d77"]]},{"id":"3257de37e9776d04","type":"function","z":"9b1b2d22cbe00b98","name":"门窗为关","func":"if (msg.payload == 'off') {\n msg.payload = true;\n}\nelse {\n msg.payload = false;\n}\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":1620,"wires":[["2ccdbd6a64425d77"]]},{"id":"2ccdbd6a64425d77","type":"BooleanLogicUltimate","z":"9b1b2d22cbe00b98","name":"书房窗开启&关闭","payloadPropName":"payload","filtertrue":"both","persist":true,"sInitializeWith":"WaitForPayload","triggertopic":"trigger","outputtriggeredby":"all","inputCount":"2","topic":"result","restrictinputevaluation":false,"delayEvaluation":0,"x":1270,"y":1600,"wires":[["fffca89dc264e977"],[],[]]},{"id":"b9165514f95f1957","type":"api-current-state","z":"9b1b2d22cbe00b98","name":"右窗","server":"815db3a5.11a8f","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":870,"y":1620,"wires":[["3257de37e9776d04"]]},{"id":"dba3feb5faa1e295","type":"api-current-state","z":"9b1b2d22cbe00b98","name":"左窗","server":"815db3a5.11a8f","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":870,"y":1580,"wires":[["b2e5ac8bf6230131"]]},{"id":"fffca89dc264e977","type":"switch","z":"9b1b2d22cbe00b98","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":1450,"y":1600,"wires":[["a64df3195e769a92"],["0e2e6a80f6f25073"]]},{"id":"9b0853cd4982f210","type":"inject","z":"9b1b2d22cbe00b98","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":730,"y":1600,"wires":[["dba3feb5faa1e295","b9165514f95f1957"]]},{"id":"0e2e6a80f6f25073","type":"debug","z":"9b1b2d22cbe00b98","name":"debug 65","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1600,"y":1640,"wires":[]},{"id":"a64df3195e769a92","type":"debug","z":"9b1b2d22cbe00b98","name":"debug 66","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1600,"y":1580,"wires":[]},{"id":"815db3a5.11a8f","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]
|
-
|