Hi,
I have a flow that sets some dictionary values into msg, and I want to pass all the dictionary into an input_text helper as json string.
I first tested such a sample flow, where the input text is node red object. This works fine…
The node config is trivially simple:
But, I can’t use it this way, because I have multiple input_text helpers and I select them dynamically based on one of the payload values. I have regular input_text helpers created in HA.
This is part of the real flow:
With such settings, instead of this json string:
{"presence":true,"icon":"mdi:motion-sensor","text":"Biuro"}
I get instead:
{"presence":true,"icon":"mdi:motion-sensor","text":"Biuro"}
Effectively the whole json formatted status is passed as single string value…
If I change data formula to:
{"value" : {{{status}}} }
I get this error message:
"HomeAssistantError: value should be a string for dictionary value @ data['value']"
I’ve already spent hours googling and trying different options, but no help.
The only workaround I’ve found is manually formatting the json string inside the Data field, but that is quite annoying…
Any ideas how to pass an already properly formatted json string to be recognized as json?