Hi everyone, I’m encountering an issue with the Homey.logic.updateVariable
function in my Homey script. I’m trying to update a logic variable named conteggio_eventi
. The variable is successfully retrieved with the following ID: 8bed27e2-2905-430b-91fe-36ca4d37d0a1
.
Here’s what I’ve done so far:
- I successfully fetch logic variables using
Homey.logic.getVariables()
. - I confirm the variable’s ID and value.
- I call
Homey.logic.updateVariable
using the following formats:
{ id: '8bed27e2-2905-430b-91fe-36ca4d37d0a1', value: 1 }
{ variable: { id: '8bed27e2-2905-430b-91fe-36ca4d37d0a1', value: 1 } }
In both cases, I get the error: “Missing Parameter: variable”.
Here’s the output from the logs:
Attempting to update the “conteggio_eventi” variable
Object passed to updateVariable: { variable: { id: ‘8bed27e2-2905-430b-91fe-36ca4d37d0a1’, value: 1 } }
UpdateVariable: Error - Missing Parameter: variable
I’m unsure what parameter might be missing or if I’m using the wrong format. Has anyone had experience with this function and can help me resolve the issue?
Thank you in advance!
Ciao, Andrea