And for those of you who need a shopping list system, here it is!
Pour ceux qui cherchent un système de liste de courses…
[{"id":"9e1cf1fd.d7ddf","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"37f700ac.246f6","type":"file in","z":"9e1cf1fd.d7ddf","name":"","filename":"/home/pi/ShoppingList.txt","format":"lines","chunk":false,"sendError":false,"encoding":"utf8","x":449,"y":260,"wires":[["8e5302ff.f4785"]]},{"id":"1a3d3279.0dadde","type":"http request","z":"9e1cf1fd.d7ddf","name":"http://localhost:12101/api/text-to-speech","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://localhost:12101/api/text-to-speech","tls":"","persist":false,"proxy":"","authType":"basic","x":720,"y":460,"wires":[[]]},{"id":"cd4f8ead.fd43","type":"template","z":"9e1cf1fd.d7ddf","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Item {{parts.index}}: {{payload}} !","output":"str","x":400,"y":380,"wires":[["1a3d3279.0dadde"]]},{"id":"8e5302ff.f4785","type":"switch","z":"9e1cf1fd.d7ddf","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":320,"wires":[["cd4f8ead.fd43"],["7819fb36.9cb494"]]},{"id":"7819fb36.9cb494","type":"template","z":"9e1cf1fd.d7ddf","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Fin de la liste","output":"str","x":400,"y":420,"wires":[["1a3d3279.0dadde"]]},{"id":"9e154e42.37a18","type":"websocket in","z":"9e1cf1fd.d7ddf","name":"","server":"","client":"b6a5c0dd.6135","x":200,"y":89,"wires":[["b78aca49.dfd3e8"]]},{"id":"b78aca49.dfd3e8","type":"switch","z":"9e1cf1fd.d7ddf","name":"","property":"intent.name","propertyType":"msg","rules":[{"t":"eq","v":"AddToList","vt":"str"},{"t":"eq","v":"ReadList","vt":"str"},{"t":"eq","v":"EraseList","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":193,"y":168,"wires":[["4ad4a94f.f70fb8"],["37f700ac.246f6"],["42a0c952.a1ef08"],["3e4167ca.b840d8"]]},{"id":"5061031.c4cbefc","type":"file","z":"9e1cf1fd.d7ddf","name":"","filename":"/home/pi/ShoppingList.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"utf8","x":770,"y":276,"wires":[[]]},{"id":"7130ea33.5b34c4","type":"comment","z":"9e1cf1fd.d7ddf","name":"Liste des courses - créer / ajouter","info":"","x":737,"y":100,"wires":[]},{"id":"9c44c7d1.47cad8","type":"template","z":"9e1cf1fd.d7ddf","name":"je complète la liste","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"je complète la liste avec {{slots.item_courses}}","output":"str","x":748,"y":319,"wires":[["1a3d3279.0dadde"]]},{"id":"4ad4a94f.f70fb8","type":"template","z":"9e1cf1fd.d7ddf","name":"","field":"slots.item_courses","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"- {{slots.item_courses}}","output":"str","x":673,"y":150,"wires":[["f065144d.f9bdf8"]]},{"id":"f065144d.f9bdf8","type":"change","z":"9e1cf1fd.d7ddf","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"slots.item_courses","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":695,"y":208,"wires":[["5061031.c4cbefc","9c44c7d1.47cad8"]]},{"id":"218470f5.88324","type":"comment","z":"9e1cf1fd.d7ddf","name":"Liste des courses - lire","info":"","x":442,"y":210,"wires":[]},{"id":"42a0c952.a1ef08","type":"file","z":"9e1cf1fd.d7ddf","name":"","filename":"/home/pi/ShoppingList.txt","appendNewline":true,"createDir":false,"overwriteFile":"delete","encoding":"utf8","x":443,"y":564,"wires":[["45d97948.79a708"]]},{"id":"4d3693ae.f3fc3c","type":"comment","z":"9e1cf1fd.d7ddf","name":"liste des courses - effacer","info":"","x":426,"y":510,"wires":[]},{"id":"45d97948.79a708","type":"template","z":"9e1cf1fd.d7ddf","name":"j'efface la liste","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"j'efface la liste","output":"str","x":698,"y":564,"wires":[["1a3d3279.0dadde"]]},{"id":"3e4167ca.b840d8","type":"template","z":"9e1cf1fd.d7ddf","name":"Non reconnu","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"je ne connais pas - pas compris","output":"str","x":181,"y":462,"wires":[["1a3d3279.0dadde"]]},{"id":"b6a5c0dd.6135","type":"websocket-client","path":"ws://localhost:12101/api/events/intent","tls":"","wholemsg":"true"}]
It can be combined with the previous flow or run on its own.
Il peut compléter le flow précédent ou fonctionner indépendamment.
Il suffit de ces phrases et d’une list d’items (la votre) dans les slots.
[AddToList]
(complète | ajoute) [à la] liste [avec] ($liste_items){item_courses}
[ReadList]
(lis | lecture) [de la] liste [des] courses
[EraseList]
efface [la] liste [des] courses