[
{
"id": "a11fe5d5f925d625",
"type": "switch",
"z": "7b83b20cb732bf2a",
"name": "State Check",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 330,
"y": 4540,
"wires": [
[
"7f43e84379a325f0"
]
]
},
{
"id": "466c14c6527970fd",
"type": "function",
"z": "7b83b20cb732bf2a",
"name": "Convert to ms",
"func": "msg.delay = msg.payload * 3600 * 1000;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 720,
"y": 4540,
"wires": [
[
"82c75dbcb3b9b39b",
"17f0b39b5693aa70"
]
]
},
{
"id": "82c75dbcb3b9b39b",
"type": "debug",
"z": "7b83b20cb732bf2a",
"name": "Debug Converted Delay",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 990,
"y": 4680,
"wires": []
},
{
"id": "17f0b39b5693aa70",
"type": "delay",
"z": "7b83b20cb732bf2a",
"name": "Delay",
"pauseType": "delayv",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 930,
"y": 4540,
"wires": [
[
"e417af4fdca302a8"
]
]
},
{
"id": "7f43e84379a325f0",
"type": "change",
"z": "7b83b20cb732bf2a",
"name": "Get memory",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "#:(file)::vp_av_timer",
"tot": "flow",
"dc": true
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 530,
"y": 4540,
"wires": [
[
"466c14c6527970fd"
]
]
},
{
"id": "6a0a75a72153f488",
"type": "inject",
"z": "7b83b20cb732bf2a",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "off",
"payloadType": "str",
"x": 930,
"y": 4600,
"wires": [
[
"e417af4fdca302a8"
]
]
}
]
Can anyone tell me if this will work, the goal is to delay a action to run for several hours, based on the value it gets from the memory. The function node gives me this message while testing: { payload: "2.0", data: object, topic: "automation.adjust_heat_pump_te…", _msgid: "1685e656d76ca6ac", delay: 7200000 }