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

 找回密码
 立即注册
查看: 6636|回复: 1

[流程系列] 怎么比较二个温度传感器的温度大小

[复制链接]

12

主题

199

帖子

1903

积分

金牌会员

Rank: 6Rank: 6

积分
1903
金钱
1704
HASS币
10
发表于 2021-2-18 23:30:52 | 显示全部楼层 |阅读模式
本帖最后由 lighu36 于 2021-2-18 23:32 编辑

[{"id":"e0f038b1.5ccd08","type":"json","z":"deae99b8.0460c8","name":"获取数据转换","property":"payload","action":"obj","pretty":true,"x":320,"y":380,"wires":[["5829fb34.34c1c4"]]},{"id":"5829fb34.34c1c4","type":"change","z":"deae99b8.0460c8","name":"提取传感器温度","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.DS18B20","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":380,"wires":[["c023df4f.4d838"]]},{"id":"b390b73d.6476e","type":"ioBroker in","z":"deae99b8.0460c8","name":"水桶的水温度","topic":"mqtt.0.tele.tai_yang_neng_xun_huan.SENSOR","payloadType":"value","onlyack":"","func":"all","gap":"","fireOnStart":"false","x":150,"y":380,"wires":[["e0f038b1.5ccd08"]]},{"id":"751b0773.65da38","type":"debug","z":"deae99b8.0460c8","name":"","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":940,"y":380,"wires":[]},{"id":"89ec098b.0a258","type":"ioBroker in","z":"deae99b8.0460c8","name":"太阳板温度","topic":"mqtt.0.tele.tai_yang_ban_wen_du_cai_ji.SENSOR","payloadType":"value","onlyack":"","func":"all","gap":"","fireOnStart":"false","x":140,"y":440,"wires":[["b4ba51be.53a3c"]]},{"id":"b4ba51be.53a3c","type":"json","z":"deae99b8.0460c8","name":"获取数据转换","property":"payload","action":"obj","pretty":true,"x":320,"y":440,"wires":[["89838f8f.d86cd8"]]},{"id":"89838f8f.d86cd8","type":"change","z":"deae99b8.0460c8","name":"提取传感器温度","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.DS18B20.Id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":440,"wires":[["c023df4f.4d838"]]},{"id":"c023df4f.4d838","type":"function","z":"deae99b8.0460c8","name":"","func":"return msg","outputs":1,"noerr":0,"initialize":"","finalize":"","x":710,"y":400,"wires":[["751b0773.65da38"]]}]

WX20210218-233211@2x.png
大佬们怎么比较温度值的大小(上面是流)
回复

使用道具 举报

0

主题

173

帖子

1403

积分

金牌会员

Rank: 6Rank: 6

积分
1403
金钱
1230
HASS币
0
发表于 2021-2-19 14:59:50 | 显示全部楼层

我是用get template節點比較數值輸出true/false,再用swtich節點判斷true/false執行後面不同的動作


Xnip2021-02-19_14-56-50.png Xnip2021-02-19_14-57-24.png
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-21 23:29 , Processed in 1.480468 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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