Why the value of variables is not coherent (see the screenshot). The value on the variable finder is the correct value. But If I add a timeline advise and insert the variable, it show an previous value of the variable.
Not sure how to interpret your question. The tag you are hovering over with your mouse, on the right hand side of your screenshot, is the date tag, which shows today’s date: 20-4-2026. Why is that not correct?
The variable ‘Luz_dia_consultado’ at the left pane shows real value: 2026-04-26 but in the left pane, over the message I try to send to the timeline shows: 2026-04-20. That is the previous value of the variable, not the last.
When it shows previous values when using that notification card, most probably the calculations aren’t completed yet.
In case you send it per notification card right after the actual calculation (guessumption, as can’t see that on your screenshot…) add one or a few seconds delay to it. This allows calculations to complete first, before you send them elsewhere.
Just to double check: the date tag you were hovering over in your screenshot, is that the built-in date tag provided by Homey (that was my understanding). If so: you cannot change the value of that tag; it is determined by Homey and shows today’s date. But maybe you were hovering over a different tag.
If you were referring to the calculated variable then I misunderstood you and than indeed, as @Peter_Kawa indicated, there might be a slight delay in the updates.
No, the screenshot is not of the system variable “date”. It’s of a variable I created, updated by a script that runs once a day. As the screenshot shows, the variables window indicates that the variable has the correct value; however, the variable ‘within’ the card displays an outdated value.
My problem stems from using variables that are updated from scripts. The idea is to be able to execute tasks from a flow based on a variable written or changed from a script. It was working perfectly fine. And then suddenly, without any changes, it stopped working. The first problem is that it’s really difficult to check the actual value of a variable because, as I showed in the screenshots at the beginning of this thread, you see one thing in one window and something else in another. Now I’m thinking there might be a problem with duplicate variables, because, according to this last screenshot I’m sending, I have the same variable repeated. The only difference is that one appears under a title that says: “homey:app:com.athom.homeyscript” and the other says “logic”.
They don’t appear twice, but you’re mixing up Homeyscript “tags” with Logic variables. These are not related, but both can be used in flows.
You created a Homeyscript “tag” by some script, with the same name as your Logic variable. Or the other way 'round.
That’s not what I would do (just too confusing).
However, it’s possible to create & read Logic variables with Homeyscript as well, albeit quite complicated compared to Homeyscript tags.
//Name of Logic Variable
var name = "TVProgramma";
//Read Logic Var
var value = await ReadLogicVar(name);
console.log("The parameter '"+name+"' has a value '"+value+"'");
//Write Logic Var
var new_value = "NOS Journaal";
await WriteLogicVar(name,new_value);
async function ReadLogicVar(name){
let Logic = await Homey.logic.getVariables();
let idArr = Object.entries(Logic);
let filtered = idArr.filter(([key,value]) => value.name==name);
let [[,{id:varID}]] = filtered;
var varArr = await Homey.logic.getVariable({id:varID});
return varArr.value;
}
async function WriteLogicVar(name,value){
let Logic = await Homey.logic.getVariables();
let idArr = Object.entries(Logic);
let filtered = idArr.filter(([key,value]) => value.name==name);
let [[,{id:varID}]] = filtered;
var varArr = await Homey.logic.getVariable({id:varID});
if (typeof(value) == varArr.type){
await Homey.logic.updateVariable({id:varID,variable:{value:value}})
//console.log("Value has been updated")
return true;
}
else{
console.log("New value has the wrong type! Expected type is '"+varArr.type+"', not '"+typeof(value)+"'. Value has NOT been updated!")
return false;
}
}