# Time as variable

**URL:** https://community.homey.app/t/time-as-variable/150046
**Category:** Questions & Help
**Created:** [January 25, 2026, 6:00pm UTC](https://community.homey.app/t/time-as-variable/150046 "2026-01-25T18:00:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![H\_van\_Barneveld](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/h_van_barneveld/32/18371_2.png) [@H\_van\_Barneveld](https://community.homey.app/u/H_van_Barneveld)
#### Post date: [January 25, 2026, 6:00pm UTC](https://community.homey.app/t/time-as-variable/150046/1 "2026-01-25T18:00:42Z")

</div>

I’m using the day/night vision feature of one of our cameras as a day/night sensor. The flow works perfectly, but the only thing missing is the option to adjust the exact moment of switching between day and night. I’d like to save the switching time as a text variable (which works so far) and then use this value the next day to turn the lights on half an hour earlier. For example, if I save 17:30 today, I want to use 17:00 tomorrow as the switch-on time. This way, throughout the year, the timing will follow the seasons, adjusting daily based on the previous day’s time.

---

<div class="post-metadata">

### Author: ![Ruuduitdegraaf](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ruuduitdegraaf/32/120861_2.png) [@Ruuduitdegraaf](https://community.homey.app/u/Ruuduitdegraaf)
#### Post date: [January 25, 2026, 6:35pm UTC](https://community.homey.app/t/time-as-variable/150046/2 "2026-01-25T18:35:57Z")

</div>

Hans, why would you like to do it that way?

There is a IF card under date and time “als de zon onder gaat in … min”

Could that do what you are looping for?

Ruud

---

<div class="post-metadata">

### Author: ![Wim\_Post](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wim_post/32/56793_2.png) [@Wim\_Post](https://community.homey.app/u/Wim_Post)
#### Post date: [January 25, 2026, 6:38pm UTC](https://community.homey.app/t/time-as-variable/150046/3 "2026-01-25T18:38:19Z")

</div>

Have a look at the Timey-app:

> **[Timey | Homey](https://homey.app/nl-nl/app/no.kjeet90.timey/Timey/)**
>
> Make your time flows dynamic with variables

(Today was very sunny. If tomorrow is very gloomy the lights will come on way too late. Consider a lightsensor)
