# Plug in receiver On/Off several times

**URL:** <https://community.homey.app/t/plug-in-receiver-on-off-several-times/55817>\
**Category:** Flows\
**Created:** [December 1, 2021, 1:41pm UTC](https://community.homey.app/t/plug-in-receiver-on-off-several-times/55817 "2021-12-01T13:41:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndersElm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anderselm/32/35346_2.png) [@AndersElm](https://community.homey.app/u/AndersElm)\
**Post date:** [December 1, 2021, 1:41pm UTC](https://community.homey.app/t/plug-in-receiver-on-off-several-times/55817/1 "2021-12-01T13:41:29Z")

</div>

Hello!  
I would like to have my outdoor receiver turning on and off every other hour.  
It is for my engine heater.  
I have fire preparedness every four week and need an icefree car in the winter.  
Its ok if a start and stop the flow with one or to “buttons” manually.  
Can anyone help me? I am a beginner at Homey.

---

<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:** [December 1, 2021, 1:50pm UTC](https://community.homey.app/t/plug-in-receiver-on-off-several-times/55817/2 "2021-12-01T13:50:59Z")

</div>

> [@AndersElm](#):
>
> turning on and off every other hour

If I understand you correct, you want to turn on your outdoor receiver (whatever is meant by this) e.g. at 6 a.m. and turn it off at 7 a.m… Then turn it on again at 8 a.m. and turn it off 1 hour later.

**When…**  
– Every 2 hours  
**Then…**  
– Turn on  
– Turn off with a delay of 60 minutes

---

<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:** [December 1, 2021, 1:52pm UTC](https://community.homey.app/t/plug-in-receiver-on-off-several-times/55817/3 "2021-12-01T13:52:35Z")

</div>

This should do, if I understood your question right:

If…  
[Date & Time] every 1 hour  
And…  
Virtual Switch “Car Heater” is on  
Then…  
turn plug A on or off

• The action card (at the Then section) turns the plug on if it’s off, and off if it’s on.

• If the virtual Switch is turned off by you, the flow doesn’t execute.

Visual example of the flow:

---

<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:** [December 1, 2021, 3:17pm UTC](https://community.homey.app/t/plug-in-receiver-on-off-several-times/55817/4 "2021-12-01T15:17:37Z")

</div>

@Peter_Kawa, your flow is indeed the better and easier solution. And you can turn the flow on/off by using a virtual switch. 👍🏼

I don’t know the exact use case, but maybe you can optimize the flow a bit.  
Instead of the virtual switch you could use the [IcalCalender app](https://homey.app/en-us/app/no.runely.calendar/IcalCalendar/) and create a calendar with the days of fire readiness.  
With the help of the presence detection, the receiver is only switched when you are at home.

**When…**  
– Every hour  
**And…**  
– Anders is at home  
– Specific event is ongoing “Fire Readiness” (IcalCalender App)  
**Then…**  
– Turn on or off

---

<div class="post-metadata">

**Author:** ![AndersElm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anderselm/32/35346_2.png) [@AndersElm](https://community.homey.app/u/AndersElm)\
**Post date:** [December 2, 2021, 1:43pm UTC](https://community.homey.app/t/plug-in-receiver-on-off-several-times/55817/5 "2021-12-02T13:43:34Z")

</div>

Hello!  
It worked fine. Thanks!  
I did put in weeks to. 🙂

**When…**  
– Every 2 hours

**And**  
Weeknumber is 1  
or  
Weeknumber is 5  
(and so on)

**Then…**  
– Turn on  
– Turn off with a delay of 60 minutes
