Getting next hours electric spot-price from Nordpool via nordpool-api-plus

So you need to determine the hour you're in then use that to find the array with that index
e.g.

const date = new Date();
///date.setHours(date.getHours()+1); // uncomment for next hour
const index = date.getHours();
msg.payload = msg.payload[index].price
return msg;

your error is
You must return an object to each output.
eg. set the price to a msg property.

2 Likes