This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Closed Flows
[FLOW] [Example] Trigger XX Minutes before Sunset
![GeurtDijker](https://forum.athom.com/uploads/userpics/388/nHJK418XP9YTK.jpg)
I want to contribute and document the way to trigger something fe almost half an hour before Sunset ....
Actually we are triggering on XX minutes after the last Sunset, so it varies a couple of minutes and is tested only once a minute.
All Credits to @Phuturist and the fabulous search engine on the forum (that makes this actual "re-post" necessary to find something for new Homey Owners ).
Original Post: https://forum.athom.com/discussion/comment/15118/#Comment_15118
I hope this will help others / new Homey Owners to find the solution faster....
Type: Number
When - The Sun Sets
And - []
Then - Execute Math.js expression: [$timenow$ + 84600] [BeforeSunSet] + Enable a Flow [SunSetInHalfHour]
![Image: https://forum.athom.com/uploads/editor/na/x274on6vatgk.png](https://forum.athom.com/uploads/editor/na/x274on6vatgk.png)
SunSetInHalfHour
When - Every 1 minute
And - Math.js expression is true [$BeforeSunSet$ < $timenow$]
Then - Send A Push Notification to [User] Msg:[Sunset in Half an Hour !! <time] !! ]+ Disable a Flow [SunSetInHalfHour]
![Image: https://forum.athom.com/uploads/editor/xp/n2jq20roipo4.png](https://forum.athom.com/uploads/editor/xp/n2jq20roipo4.png)
Enabling /disabling is necessary to prevent half an hour every minute a trigger / push msg.
The math.js function in the first action card is $timenow$ + 84600 (where 84600 is one day minus half an hour)
Actually we are triggering on XX minutes after the last Sunset, so it varies a couple of minutes and is tested only once a minute.
All Credits to @Phuturist and the fabulous search engine on the forum (that makes this actual "re-post" necessary to find something for new Homey Owners ).
Original Post: https://forum.athom.com/discussion/comment/15118/#Comment_15118
I hope this will help others / new Homey Owners to find the solution faster....
Prerequisites/ What I have:
- Homey ;-)
- BetterLogic App
- Android App to Push Repporting.
- Someting else to execute
Type: Number
Flows:
I Created the Following Flows:- SunSet
- SunSetInHalfHour
When - The Sun Sets
And - []
Then - Execute Math.js expression: [$timenow$ + 84600] [BeforeSunSet] + Enable a Flow [SunSetInHalfHour]
![Image: https://forum.athom.com/uploads/editor/na/x274on6vatgk.png](https://forum.athom.com/uploads/editor/na/x274on6vatgk.png)
SunSetInHalfHour
When - Every 1 minute
And - Math.js expression is true [$BeforeSunSet$ < $timenow$]
Then - Send A Push Notification to [User] Msg:[Sunset in Half an Hour !! <time] !! ]+ Disable a Flow [SunSetInHalfHour]
![Image: https://forum.athom.com/uploads/editor/xp/n2jq20roipo4.png](https://forum.athom.com/uploads/editor/xp/n2jq20roipo4.png)
Enabling /disabling is necessary to prevent half an hour every minute a trigger / push msg.
The math.js function in the first action card is $timenow$ + 84600 (where 84600 is one day minus half an hour)
Tagged:
This discussion has been closed.
Comments