Tibber-Query data output problem

Hallo every body,

im new here and have no huge experience with Node-Red.
I have a problem with the tibber query node.
I only whant to switch on a relay if the energy price is low, so I copyed a script of a guy witch is working with the Demo Tibber Access token. But if I replace this Token with my own, than the script stops working.

That's the script with the error codes:

The Problem is, that I have two homes in my tibber App, so the querry node is sending two price informations to the Price resiver node.

How do I change the "Template-Node" so, that the "query-Node" only puts out prices for home 1 ?

Thanks for your help.

Greatings Phil

Without an example flow it is hard to be sure.

You could just move msg.payload.viewers.homes[1] to msg.payload.viewers.homes using a change node after the tibber noide