hassio-addons / addon-node-red

Node-RED - Home Assistant Community Add-ons
https://addons.community
MIT License
529 stars 122 forks source link

error with json variabile #1792

Closed guegiurm closed 7 months ago

guegiurm commented 8 months ago

Problem/Motivation:

Hello, I have noticed that there are considerable problems with the 'call service' node. What happened is that before the update when passing json variables of type {{msg.payload}} it would take its value whereas now it returns an error: InputError: Invalid JSON:
Why can't the JSON value be supplied?

(Why the issue was filed)

Expected behavior

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

martinsheldon commented 8 months ago

I'm doing the same as you in the Service Call node but I use this without the "msg." at the beginning of the variable. Maybe you can try that?

image

guegiurm commented 8 months ago

I only tried with {{payload}} but it gives me the same error.I attach some photosGiuseppeIl giorno 8 gen 2024, alle ore 18:03, martinsheldon @.***> ha scritto: I'm doing the same as you in the Service Call node but I use this without the "msg." at the beginning of the variable. Maybe you can try that? image.png (view on web)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

tanker11 commented 8 months ago

Hello, same here. {"message":"{{payload}}"} format helps but is it the correct one? Should I correct everywhere from {{msg.payload.data}}? I have almost a hundred nodes like this!

github-actions[bot] commented 7 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!