Aymkdn / assistant-plugins

Des plugins pour les Assistant (comme Google Home, Cortana, Alexa)
https://aymkdn.github.io/assistant-plugins/
MIT License
92 stars 21 forks source link

Unexpected token avec assistant-temperature-local #197

Closed histoirede closed 5 years ago

histoirede commented 5 years ago

Bonjour, j'ai fait un applet IFTTT, mais cela ne fonctionne pas. Il y a plusieurs stations Netatmo dans le périmètre défini. Merci de ton aide.

applet IFTTT: Title: Assistant. Message : temperature-local_{'lat_ne':43.336325,'lon_ne':-0.408056,'lat_sw':43.327845,'lon_sw':-0.454078}

Voici le retour à la console: [assistant-control-windows] Plugin chargé et prêt. [assistant] Chargement du plugin 'freebox' (v2.0.11) [assistant-freebox] Récupération des chaines terminée ! [assistant-freebox] Plugin chargé et prêt. [assistant] Chargement du plugin 'ifttt' (v2.0.1) [assistant-ifttt] Plugin chargé et prêt. [assistant] Chargement du plugin 'notifier' (v2.1.5) [assistant-notifier] Plugin chargé et prêt. [assistant] Chargement du plugin 'temperature-local' (v1.0.2) [assistant-temperature-local] Plugin chargé et prêt. [assistant] Prêt à écouter les commandes via PushBullet [assistant] Commande reçue: [ temperature-local_{'lat_ne':43.336325,'lon_ne":-0.408056,'lat_sw"43.327845,'lon_sw":-0.454078} ] [assistant] Appelle du plugin 'temperature-local' (node:9700) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token : in JSON at position 32 at JSON.parse () at AssistantTemperatureLocal.action (C:\Users\assistant-plugins\node_modules\assistant-temperature-local\temperature-local.js:30:19) at C:\Users\assistant-plugins\node_modules\assistant-plugins\index.js:101:46 at C:\Users\assistant-plugins\node_modules\assistant-plugins\index.js:10:16 at process.internalTickCallback (internal/process/next_tick.js:77:7) (node:9700) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:9700) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Aymkdn commented 5 years ago

Tu utilises parfois des " et parfois des ' donc ta chaine JSON est incorrect.

Il faut que tu mettes : temperature-local_{'lat_ne':43.336325,'lon_ne':-0.408056,'lat_sw':43.327845,'lon_sw':-0.454078}

histoirede commented 5 years ago

Merci beaucoup. Cordialement.

Envoyé de mon iPad

Le 3 déc. 2018 à 15:49, Aymeric notifications@github.com a écrit :

Tu utilises parfois des " et parfois des ' donc ta chaine JSON est incorrect.

Il faut que tu mettes : temperature-local_{'lat_ne':43.336325,'lon_ne':-0.408056,'lat_sw':43.327845,'lon_sw':-0.454078}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.