# Starting a flow when the time is equal to the value of a variable

**URL:** <https://community.homey.app/t/starting-a-flow-when-the-time-is-equal-to-the-value-of-a-variable/88726>\
**Category:** Questions & Help\
**Tags:** flow, homey-pro\
**Created:** [September 4, 2023, 7:06am UTC](https://community.homey.app/t/starting-a-flow-when-the-time-is-equal-to-the-value-of-a-variable/88726 "2023-09-04T07:06:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Bittner](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_bittner/32/16698_2.png) [@Peter\_Bittner](https://community.homey.app/u/Peter_Bittner)\
**Post date:** [September 4, 2023, 7:06am UTC](https://community.homey.app/t/starting-a-flow-when-the-time-is-equal-to-the-value-of-a-variable/88726/1 "2023-09-04T07:06:17Z")

</div>

My power provider sells me power at the wholesale price. Prices can vary from -50c/Kw (they pay you to use power) to $1+/Kw depending on the day and the time of day. I therefore want to set two variables as the on/off times for the car charger.

Even if I have to go to the App and set the Variables manually, how can I build a flow to start at the time according to the value of a variable? If I could input the variables when I press a virtual device even better.

---

<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 4, 2023, 8:09am UTC](https://community.homey.app/t/starting-a-flow-when-the-time-is-equal-to-the-value-of-a-variable/88726/2 "2023-09-04T08:09:07Z")

</div>

You could try the app Power by the Hour, depends if it will fetch your prices.  
That app Downloads the prices for the next couple of hours.  
And if it has the prices you can build a flow around it.  
[https://homey.app/en-us/app/com.gruijter.powerhour/Power-by-the-Hour/](https://homey.app/en-us/app/com.gruijter.powerhour/Power-by-the-Hour/)

---

<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 4, 2023, 11:51am UTC](https://community.homey.app/t/starting-a-flow-when-the-time-is-equal-to-the-value-of-a-variable/88726/3 "2023-09-04T11:51:43Z")

</div>

Also interesting: The [Piggy Bank app](https://homey.app/a/no.sparegris/) has a price dependent EV charge function among other stuff. The app is quite technical though, but the dev is very helpful.

> [@\[APP\]\[Pro\] Piggy Bank](https://community.homey.app/t/app-pro-piggy-bank/66677):
>
> This topic is about the Piggy Bank app. The main purpose of this app is to make sure the power usage for every hour is within the targeted power tariff in Norway (now also Belgium - if someone can confirm I did it right). New features are being added continuously. It is being developed at [GitHub - frodeheg/no.sparegris: Saves money by adjusting when to use electricity](https://github.com/frodeheg/no.sparegris)Common questions 1. When will my device be supported If your device is not supported, Please send me a device report and I w…

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [September 4, 2023, 6:46pm UTC](https://community.homey.app/t/starting-a-flow-when-the-time-is-equal-to-the-value-of-a-variable/88726/4 "2023-09-04T18:46:41Z")

</div>

Or the app Heating controller, which also can switch devices (heating, but not necessarily) on or off based on dynamic prices.

> [@\[APP\]\[Pro\] Heating Controller with utility prices](https://community.homey.app/t/app-pro-heating-controller-with-utility-prices/7795):
>
> The ‘Heating Controller’ is a device for easily controlling temperatures and modes for thermostats and sockets for heating. To switch between ‘Comfort’ and ‘ECO’ modes, just two flows are necessary: one ‘Comfort’ flow with comfort temperatures and modes, and one ‘ECO’ flow with ECO temperatures and modes. Each ‘HeatingController’ device has its own schedule that can be changed from ‘Advanced settings’. Several devices can be used, each with their own schedule. The app has support for public…

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [September 4, 2023, 6:51pm UTC](https://community.homey.app/t/starting-a-flow-when-the-time-is-equal-to-the-value-of-a-variable/88726/5 "2023-09-04T18:51:24Z")

</div>

Other solution for your situation is to use the app [IcalCalendar App voor Homey | Homey](https://homey.app/nl-nl/app/no.runely.calendar/IcalCalender/) and use a calendar to manually define the start and stop time for charging. The app gives the triggers for start and stop off the event which you can use to start and stop charging.  
(I use this for the situation I want to be sure the charging starts at a specific time, and not based on “lowest price” logic from pbth app).
