- 积分
- 475
- 金钱
- 422
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
- 积分
- 475
- 金钱
- 422
- HASS币
- 0
|
发表于 2023-6-16 14:08:03
|
显示全部楼层
node-red-contrib-counter
node-red-contrib-time-range-switch
添加上面节点
[
{
"id": "69046ac987cc03cf",
"type": "switch",
"z": "5734632741bfa5d8",
"name": "",
"property": "count",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 590,
"y": 420,
"wires": [
[]
]
},
{
"id": "24a23932863897ff",
"type": "inject",
"z": "5734632741bfa5d8",
"name": "每日6点归零",
"props": [
{
"p": "payload"
},
{
"p": "reset",
"v": "count",
"vt": "str"
}
],
"repeat": "",
"crontab": "00 06 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 260,
"y": 500,
"wires": [
[
"44d215ba8f100c8a"
]
]
},
{
"id": "6a9fc8233d23172c",
"type": "comment",
"z": "5734632741bfa5d8",
"name": "每天早上6:30-8:30自动开启窗帘执行一次",
"info": "限定自动化的执行并于次日自动归零\n 用counter节点计数,人体感应每触发一次,\n 数字加1,接着在后面添加一个switch节点,\n 限制为数字1才允许通过,也就是每天的第一\n 次触发\n",
"x": 200,
"y": 360,
"wires": []
},
{
"id": "5e9ae710d18ea542",
"type": "comment",
"z": "5734632741bfa5d8",
"name": "限定自动化的执行并于次日自动归零",
"info": "限定自动化的执行并于次日自动归零\n 用counter节点计数,人体感应每触发一次,\n 数字加1,接着在后面添加一个switch节点,\n 限制为数字1才允许通过,也就是每天的第一\n 次触发\n",
"x": 480,
"y": 460,
"wires": []
},
{
"id": "44d215ba8f100c8a",
"type": "counter",
"z": "5734632741bfa5d8",
"name": "",
"init": "0",
"step": "1",
"lower": null,
"upper": null,
"mode": "increment",
"outputs": 1,
"x": 440,
"y": 420,
"wires": [
[
"69046ac987cc03cf"
]
]
},
{
"id": "4e92bd136f9d86b3",
"type": "time-range-switch",
"z": "5734632741bfa5d8",
"name": "",
"lat": "114.2835",
"lon": "30.6151",
"startTime": "6:30",
"endTime": "8:30",
"startOffset": 0,
"endOffset": 0,
"x": 270,
"y": 420,
"wires": [
[
"44d215ba8f100c8a"
],
[]
]
}
] |
|