# Check/Set default variable value

**URL:** https://community.homey.app/t/check-set-default-variable-value/115604
**Category:** Questions & Help
**Tags:** flow, homey-pro
**Created:** [September 6, 2024, 9:54am UTC](https://community.homey.app/t/check-set-default-variable-value/115604 "2024-09-06T09:54:06Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Perron](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/perron/32/79290_2.png) [@Perron](https://community.homey.app/u/Perron)
#### Post date: [September 6, 2024, 9:54am UTC](https://community.homey.app/t/check-set-default-variable-value/115604/1 "2024-09-06T09:54:06Z")

</div>

When you create a new variable in a Homey flow, you have to set a value. This value is the default value that the variable is instantiated on when Homey reboots.

Is there a way to check and set these default variable values? I have a value that I would like to change, but cannot find how to do this anywhere.  
Deleting the variable and creating a new one with the same name does not work, references are lost.

Does anyone have a solution?

Thanks!

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [September 6, 2024, 10:39am UTC](https://community.homey.app/t/check-set-default-variable-value/115604/2 "2024-09-06T10:39:46Z")

</div>

With a Logic card?

---

<div class="post-metadata">

### Author: ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)
#### Post date: [September 6, 2024, 10:42am UTC](https://community.homey.app/t/check-set-default-variable-value/115604/3 "2024-09-06T10:42:19Z")

</div>

> [@Perron](#):
>
> This value is the default value that the variable is instantiated on when Homey reboots.

I’m not sure if I understand you correctly. However, the last value before the restart is restored, not the “default” value.

And there is a possibility to check the content of a variable after Homey was restarted:

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

To be able to get this flow card _ **Homey Pro was started** _, you have to activate the _ **Power User** _ in the Homey smartphone app: More → Settings → Experiments → Power User

---

<div class="post-metadata">

### Author: ![Perron](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/perron/32/79290_2.png) [@Perron](https://community.homey.app/u/Perron)
#### Post date: [September 6, 2024, 11:08am UTC](https://community.homey.app/t/check-set-default-variable-value/115604/4 "2024-09-06T11:08:33Z")

</div>

Thanks.

I have indeed seen the “restart card”, and have implemented that today. But it is not the last value, but the initial value at creation that is restored after reboot.

It seems silly that there is no way to change the default value…there should be an easier way than creating logic that runs at startup…

---

<div class="post-metadata">

### Author: ![Perron](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/perron/32/79290_2.png) [@Perron](https://community.homey.app/u/Perron)
#### Post date: [September 6, 2024, 11:09am UTC](https://community.homey.app/t/check-set-default-variable-value/115604/5 "2024-09-06T11:09:49Z")

</div>

Logic cards change the actual value, not the default one…unfortunately

---

<div class="post-metadata">

### Author: ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)
#### Post date: [September 6, 2024, 11:20am UTC](https://community.homey.app/t/check-set-default-variable-value/115604/6 "2024-09-06T11:20:15Z")

</div>

> [@Perron](#):
>
> But it is not the last value, but the initial value at creation that is restored after reboot.

If this would be the case, what it’s definitely not for me, than the most of my flows with variables would not work after a restart. And I have about 130 variables, most of them are yes/no and number variables.

---

<div class="post-metadata">

### Author: ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)
#### Post date: [September 6, 2024, 11:40am UTC](https://community.homey.app/t/check-set-default-variable-value/115604/7 "2024-09-06T11:40:22Z")

</div>

@Perron If the variable were set to default after a restart then Homey has a big problem  
Let’s say a default car Light on has as default no.

IF time is 18:00  
THEN light on  
Variable Light on to yes.

Homey restart.

IF time is 22:00  
AND variable Light on =yes  
THEN light off.

So the light will not turn off because a restart did set the variable to no.

Is it something like this?

---

<div class="post-metadata">

### Author: ![Perron](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/perron/32/79290_2.png) [@Perron](https://community.homey.app/u/Perron)
#### Post date: [September 6, 2024, 11:47am UTC](https://community.homey.app/t/check-set-default-variable-value/115604/8 "2024-09-06T11:47:15Z")

</div>

Yes exactly.

I have a variable that holds the set temperature for my airco. It was set to 23 when I created the variable.  
The variable was at 25 this morning. After reboot it was back to 23.

Problem is that this happens also when Homey gets a new software release.

---

<div class="post-metadata">

### Author: ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)
#### Post date: [September 6, 2024, 12:20pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/9 "2024-09-06T12:20:22Z")

</div>

Please contact Athom Support!!!

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [September 6, 2024, 12:39pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/10 "2024-09-06T12:39:09Z")

</div>

> [@Perron](#):
>
> When you create a new variable in a Homey flow

With which card?

---

<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: [September 6, 2024, 12:46pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/11 "2024-09-06T12:46:26Z")

</div>

Just FIY you can view (and edit) all variables’ current values here (the 3 squares button):  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/e/5ebceefc4a78f0f947a54217eac3d8aeeeaeef2a.png)

In the mobile app: goto …More \> Variables

Indeed Variables should absolutely not get changed SOLELY by a restart event;  
TAGS however, provided by the apps & devices, of course can change at any time.

> [@Perron](#):
>
> It was set to 23 when I created the variable.  
> The variable was at 25 this morning. After reboot it was back to 23.

It’s easy to monitor a variable, just create a flow like this:  
 ![Screenshot from 2024-09-06 14-45-11](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/7/97364824bfb18cc4009ff7df78f0ed3d84a52b7c.png)

---

<div class="post-metadata">

### Author: ![Perron](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/perron/32/79290_2.png) [@Perron](https://community.homey.app/u/Perron)
#### Post date: [September 6, 2024, 2:38pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/12 "2024-09-06T14:38:31Z")

</div>

Not with a card, but through the menu item…

---

<div class="post-metadata">

### Author: ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)
#### Post date: [September 6, 2024, 3:00pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/13 "2024-09-06T15:00:49Z")

</div>

Your issue ia not as it should be. The last value is always stored, there is no “default” value in a variable. Contact Athom Support regarding your issue.

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [September 6, 2024, 3:31pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/15 "2024-09-06T15:31:24Z")

</div>

> [@Perron](#):
>
> The variable was at 25 this morning. After reboot it was back to 23

That could be just the case. You have to make a better testplan to be shure: make a variable with a value with the menu, change it once with a flow. And check its value before and after a restart.

---

<div class="post-metadata">

### Author: ![Perron](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/perron/32/79290_2.png) [@Perron](https://community.homey.app/u/Perron)
#### Post date: [September 6, 2024, 3:33pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/16 "2024-09-06T15:33:14Z")

</div>

Thank you all for your replies.

Last week my Homey got ‘stuck’ and I rebooted. My airco variable was back at 23. Today I rebooted again, and my airco started up, because of 23.

Today I did several tests and it did not go back to 23. So I am confused, and will monitor future reboots.  
For now, it seems that all is ok, although it was not a few times this week.

Thanks again for your insights, a variable should come back to its last value, and that sounds ok.

---

<div class="post-metadata">

### Author: ![Perron](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/perron/32/79290_2.png) [@Perron](https://community.homey.app/u/Perron)
#### Post date: [September 6, 2024, 3:35pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/17 "2024-09-06T15:35:11Z")

</div>

That is what I did. And today it all worked fine.  
I will monitor future reboots, as it has gone wrong at least three times. But I cannot reproduce…

---

<div class="post-metadata">

### Author: ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)
#### Post date: [September 6, 2024, 3:39pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/18 "2024-09-06T15:39:08Z")

</div>

> [@Perron](#):
>
> For now, it seems that all is ok, although it was not a few times this week.

Maybe you found a “bug”. Keep monitoring and report to Athom your findings.

---

<div class="post-metadata">

### Author: ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)
#### Post date: [September 6, 2024, 7:07pm UTC](https://community.homey.app/t/check-set-default-variable-value/115604/19 "2024-09-06T19:07:35Z")

</div>

@Perron Maybe the device lost the connection and after the Homey restart the connection was back and did change the valua after connection.
