Thanks for your reply
Using the delay module, I managed to cobble something together.
It's probably not the best, but it works pretty well :
[
{
"id": "e504dd10cbae1274",
"type": "delay",
"z": "2b2676f81a6deb7d",
"name": "",
"pauseType": "delayv",
"timeout": "0",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 740,
"y": 980,
"wires": [
[
"af57212ef76772e9"
]
]
},
{
"id": "50db0c636e060eab",
"type": "http request",
"z": "2b2676f81a6deb7d",
"name": "Text to Speech",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://192.168.1.22:12101/api/text-to-speech",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "basic",
"senderr": false,
"headers": [],
"x": 1080,
"y": 980,
"wires": [
[
"cce696cc46725848"
]
]
},
{
"id": "af57212ef76772e9",
"type": "function",
"z": "2b2676f81a6deb7d",
"name": "Terminé",
"func": "msg.payload = \"\\\"Compte à rebours de \" + (msg.delay/60000) + \" minutes terminé.\\\"\"\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 900,
"y": 980,
"wires": [
[
"50db0c636e060eab"
]
]
},
{
"id": "cce696cc46725848",
"type": "repeat",
"z": "2b2676f81a6deb7d",
"name": "Repeat",
"repetitions": "1",
"elseOutput": false,
"outputs": 1,
"x": 1260,
"y": 980,
"wires": [
[
"af57212ef76772e9"
]
]
},
{
"id": "6f7df16989fcca0f",
"type": "function",
"z": "2b2676f81a6deb7d",
"name": "Compte Ă rebours",
"func": "msg.delay = (msg.payload.entities[0].value*60000); // conversion millisecondes en minutes\nmsg.payload = { \"speech\": { \"text\": \"J'active un compte Ă rebours de \" + msg.payload.entities[0].value + \" minutes\" }};\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 550,
"y": 980,
"wires": [
[
"e504dd10cbae1274",
"f2a97ecabff94b75"
]
]
},
{
"id": "f2a97ecabff94b75",
"type": "http response",
"z": "2b2676f81a6deb7d",
"name": "",
"statusCode": "",
"headers": {},
"x": 750,
"y": 940,
"wires": []
}
]