I am using nodered to grab weather data from an API (provider is meteoblue). The JSON Object consists of arrays where the first 24 elements in each array represent the 24 hours of the current day. I am looking for a solution to poll the API every hour to populate openhab items with temperature, felttemperature and humidity from the API.
I figured out how to poll the API and populate the items:
Here is the node that writes the data at 1pm (13:00)
To cover all 24 hours my only idea is to copy this flow 24 times and start it at every hour with the corresponding array values “hard coded”:
Is there any better way to handle this? I am thinking about a variable that is checks the current hour and is used in the payload.
I hope I explained myself well enough as I am new to nodered and APIs