# Variables don't updated or not showing real value

**URL:** <https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033>\
**Category:** Flows\
**Tags:** advancedflow\
**Created:** [April 20, 2026, 8:24pm UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033 "2026-04-20T20:24:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nacho\_PR-perso](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nacho_pr-perso/32/131766_2.png) [@nacho\_PR-perso](https://community.homey.app/u/nacho_PR-perso)\
**Post date:** [April 20, 2026, 8:24pm UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033/1 "2026-04-20T20:24:16Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/6/b6bfec951c96819aeda705b1e5f89f5a8dd47c94.png)

This category is created to show, and explain the working of specific Flows in homey.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [April 20, 2026, 9:06pm UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033/2 "2026-04-20T21:06:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![nacho\_PR-perso](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nacho_pr-perso/32/131766_2.png) [@nacho\_PR-perso](https://community.homey.app/u/nacho_PR-perso)\
**Post date:** [April 20, 2026, 9:20pm UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033/3 "2026-04-20T21:20:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 20, 2026, 11:54pm UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033/4 "2026-04-20T23:54:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [April 21, 2026, 11:14am UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033/5 "2026-04-21T11:14:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nacho\_PR-perso](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nacho_pr-perso/32/131766_2.png) [@nacho\_PR-perso](https://community.homey.app/u/nacho_PR-perso)\
**Post date:** [April 21, 2026, 6:59pm UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033/6 "2026-04-21T18:59:16Z")

</div>

> [@SunBeech](#):
>
> ust 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.

Thank you for your interest and your responses.

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.

---

<div class="post-metadata">

**Author:** ![nacho\_PR-perso](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nacho_pr-perso/32/131766_2.png) [@nacho\_PR-perso](https://community.homey.app/u/nacho_PR-perso)\
**Post date:** [April 26, 2026, 8:38am UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033/7 "2026-04-26T08:38:46Z")

</div>

I think I have a clue about the problem.

I’ll ask directly first and then explain the context. Why are the variables appearing twice?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/9/89fc6a042615b602339399b260564e0439e99b0a.png)

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”.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 28, 2026, 10:33pm UTC](https://community.homey.app/t/variables-dont-updated-or-not-showing-real-value/154033/8 "2026-04-28T22:33:06Z")

</div>

> [@nacho\_PR-perso](#):
>
> Why are the variables appearing twice?

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).

 ![Screenshot20260429001638Vivaldi](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/2/c207ad2368e40e48226c6833f5d561fbbc72fa24.jpeg)

However, it’s possible to create & read Logic variables with Homeyscript as well, albeit quite complicated compared to Homeyscript tags.

```auto
//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;
  }
}

```

Source:

> [@Setting Logic Variable by HomeyScript](https://community.homey.app/t/setting-logic-variable-by-homeyscript/14819/43):
>
> Here I have created two functions which you can add to your scripts. //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]) =\> va…
