-
Hi there, I'm trying to filter the attributes (prices for the next 48 hours) via Node-red but I get the following error:
My function, to get the first price, looks like this:
And here's my Node-Red config:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found my own answer (in hindsight, I'm really a newbie to Node-Red): When polling 'get entities' you get an object (what's in a name) where you can copy information out of by selecting the correct path. In my case that was : msg.payload[0].attributes.prices[0].price You can find more info on objects and paths to info in an object here: Here's my node red flow:
|
Beta Was this translation helpful? Give feedback.
I found my own answer (in hindsight, I'm really a newbie to Node-Red):
When polling 'get entities' you get an object (what's in a name) where you can copy information out of by selecting the correct path.
In my case that was : msg.payload[0].attributes.prices[0].price
You can find more info on objects and paths to info in an object here:
https://nodered.org/docs/user-guide/messages
Here's my node red flow:
[{"id":"aaf8249566ac4136","type":"inject","z":"6407955a01e5b2fa","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":260,"y":320,"wires":[["a39eda9e97a5cd11"]]},{"id":"a572c0d…