Use object data in a string

Hi,

I'm trying to connect google assistant with onkyo amp.

I'm getting resonse from homeassistant node which looks like this:

msg.payload : Object
object
on: false
volume: 10

The onkyo controller node needs to get string

volume=10

How to convert object from homeassistant to string?

Hi and welcome

You can use a change node like this

image

Sorry - missed the bit about wanting a string

image

1st bit extracts just the volume
2nd bit uses JSONAta to convert it to a string

thank You

I need to get exatclty string:

volume=10 (volume="msg.payload.volume")

somehow cannot figure how

try this then

image

1 Like

Works perfectly! Thank You!