『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: afkkk

[教程系列] 系列教程《HA+NR流程控制》之二:满足多个条件后关闭灯光

[复制链接]

0

主题

19

帖子

222

积分

中级会员

Rank: 3Rank: 3

积分
222
金钱
203
HASS币
0
发表于 2023-5-12 21:29:30 | 显示全部楼层
已用上,感谢分享
回复

使用道具 举报

0

主题

19

帖子

222

积分

中级会员

Rank: 3Rank: 3

积分
222
金钱
203
HASS币
0
发表于 2023-5-12 21:31:16 | 显示全部楼层
期待下一篇Aqara和HA+NR通讯
回复

使用道具 举报

10

主题

112

帖子

586

积分

高级会员

Rank: 4

积分
586
金钱
474
HASS币
0
发表于 2023-5-24 20:57:18 | 显示全部楼层
很好的教程~~~
回复

使用道具 举报

10

主题

251

帖子

1355

积分

金牌会员

Rank: 6Rank: 6

积分
1355
金钱
1104
HASS币
0
发表于 2023-7-6 09:27:40 | 显示全部楼层
非常棒楼主的教程是难得的精品。
实用且详细,感谢楼主的分享
回复

使用道具 举报

1

主题

22

帖子

100

积分

注册会员

Rank: 2

积分
100
金钱
78
HASS币
0
发表于 2023-8-26 23:40:54 | 显示全部楼层
很好的教程
回复

使用道具 举报

10

主题

251

帖子

1355

积分

金牌会员

Rank: 6Rank: 6

积分
1355
金钱
1104
HASS币
0
发表于 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}]









Snipaste_2023-11-23_17-08-59.jpg
回复

使用道具 举报

0

主题

24

帖子

345

积分

中级会员

Rank: 3Rank: 3

积分
345
金钱
321
HASS币
0
发表于 2024-1-21 20:46:17 | 显示全部楼层
这个必须点赞
回复

使用道具 举报

0

主题

24

帖子

96

积分

注册会员

Rank: 2

积分
96
金钱
72
HASS币
0
发表于 2024-3-6 15:29:06 | 显示全部楼层
学写了,学习了,赶紧收藏
回复

使用道具 举报

1

主题

60

帖子

262

积分

中级会员

Rank: 3Rank: 3

积分
262
金钱
202
HASS币
0
发表于 2024-11-23 08:27:09 | 显示全部楼层
很好很强大。感谢
回复

使用道具 举报

0

主题

21

帖子

57

积分

注册会员

Rank: 2

积分
57
金钱
36
HASS币
0
发表于 2024-11-25 14:28:47 | 显示全部楼层
感谢分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-22 12:12 , Processed in 0.100583 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表