# Start lamp next coming day at 6am, but just once

**URL:** <https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203>\
**Category:** Flows\
**Created:** [July 18, 2022, 3:22pm UTC](https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203 "2022-07-18T15:22:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bjornd](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bjornd/32/34668_2.png) [@Bjornd](https://community.homey.app/u/Bjornd)\
**Post date:** [July 18, 2022, 3:22pm UTC](https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203/1 "2022-07-18T15:22:43Z")

</div>

hello!

I wish to be able to run a flow at any time, that will start a lamp the next coming time it gets 6am. But I only want it to do it once.

Just to get a better picture.  
I have a light that normally turns on at 9am.  
But once in a while I want it to turn on 3 hours earlier the next day, but I only want this once every 4-8 days, so it would be perfect the be able to start a flow that enables early turn on just once then the day after that it automatically is back at 9am.

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [July 18, 2022, 4:49pm UTC](https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203/2 "2022-07-18T16:49:50Z")

</div>

Flow1  
WHEN this flow is started  
Then enable this flow “flow2”

Flow2  
WHEN the time is 06:00  
THEN  
switch light on  
Disable this flow “flow2” (delay 1sec)  
Disable this flow “flow3”

Flow3 3 is the flow that currently switches on the lights at 09:00

I bet someone at this forum has even figured out a way to have your agenda appointment trigger this…

---

<div class="post-metadata">

**Author:** ![Cuprum](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cuprum/32/41409_2.png) [@Cuprum](https://community.homey.app/u/Cuprum)\
**Post date:** [July 19, 2022, 5:23am UTC](https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203/3 "2022-07-19T05:23:35Z")

</div>

Or… use the variable.  
One scene/flow/button which one set’s the variable “EarlyBird” 😉  
Then a timer-based flow at 6:00, which one checks the “EB”, and switches, if done.  
Another timer-based flow at 9:00, this one checks, if not “EB”, then switches light; otherwise clears “EB” (or… the EB clearing in a separate flow - for example @ 10:00 )

PS. In general, the both (variable/flow disable) possibilities are equal 😉 But, there may be some local side-effects to prefer one or another solution.

---

<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:** [July 19, 2022, 10:35am UTC](https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203/4 "2022-07-19T10:35:17Z")

</div>

If I didn’t make a logical mistake with the numbers, the following flow should turn on the light at least 4 times at 9:00. It depends on a calculation of a random number between 1 and 4, when the light will be turned on at 6:00. So it can be on the 5th, on the 6th, on the 7th or at the latest on the 8th day. After the light was turned on at 6:00, the next day the light will be switched on at 09:00 again for the next 4 days.

For the flows you need 2 self created numeric variables (More → Logic).  
For the first variable _ **CL\_RandomLight** _ please enter the value 1.  
For the second variable _ **CL\_RandomLight1** _ please enter a value greater than 4.  
Of course you can name the variables differently.

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

These flows will also work with the “Standard Flows”.  
Sorry for German language in the screen shot. If you don’t understand something, just ask.

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [September 11, 2022, 4:25am UTC](https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203/5 "2022-09-11T04:25:59Z")

</div>

> [@FKey](#):
>
> I bet someone at this forum has even figured out a way to have your agenda appointment trigger this…

And someone did: [tutotial-trigger-a-flow-using-calendar-events](https://community.homey.app/t/tutotial-trigger-a-flow-using-calendar-events/34017/2)

---

<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 11, 2022, 9:33am UTC](https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203/6 "2022-09-11T09:33:00Z")

</div>

I don’t understand the context between the question in this post and the ICalCalender tutorial.  
Could you possibly explain this?

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [September 11, 2022, 6:30pm UTC](https://community.homey.app/t/start-lamp-next-coming-day-at-6am-but-just-once/66203/7 "2022-09-11T18:30:06Z")

</div>

Reading back, good question.  
For some reason in july I replied referring to a calender appointment.  
But looking at the question indeed dont see why anymore…
