Jump to content
Automate Life
Wrightnearhome

Date based automation using Webcore

Recommended Posts

@Larry Underwood Brian gave me your name as someone who might be able to help me figure out how to use webcore to setup date validation to setup smart light scenes for holidays to only trigger during a specific date range. Example November 28- December 31 would be the Christmas scene etc. any help would be much appreciated. 

Edited by Wrightnearhome
  • Like 1

Share this post


Link to post
Share on other sites

3 hours ago, Wrightnearhome said:

@Larry Underwood Brian gave me your name as someone who might be able to help me figure out how to use webcore to setup date validation to setup smart light scenes for holidays to only trigger during a specific date range. Example November 28- December 31 would be the Christmas scene etc. any help would be much appreciated. 

I have one I use it starts at December 1 (that's the 335th day of the year) and ends January 10 but you can change the days and the time to what every you want. It turns on 2 smart plugs at 6 PM but only on those days of the year. Then turns one of them off at 10 PM and the other at 11 PM. Of course you can change it to whatever you need and if you need help doing that let me know.

Christmas.thumb.png.e8f2bdd20f8c102de79a00b42c9d18d0.png

You could add another boolean variable called say IsThanksgiving and set it to maybe 327 to 335 as thanksgiving is day 332 in 2019. If you want to know what day of the year a holiday is just ask google for example to get it. This will work even on leap years (as it is coming up next year), as it looks at each year as it comes.

Edited by Larry Underwood
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

@Larry Underwoodthank you for sharing this code. I will have to try it out when I get my SmartThings hub back from my parents this weekend. Was doing a proof of concept for my dad that he could use a SmartThings hub to control his thermostats based on the conditions of his current electric price with Griddy. Was able to use a SmartApp to pull in the electricity price per Kilowatt hour and based on that create conditions to turn of the HVAC system when the price goes above a set price. 

  • Like 2

Share this post


Link to post
Share on other sites
10 hours ago, Wrightnearhome said:

@Larry Underwoodthank you for sharing this code. I will have to try it out when I get my SmartThings hub back from my parents this weekend. Was doing a proof of concept for my dad that he could use a SmartThings hub to control his thermostats based on the conditions of his current electric price with Griddy. Was able to use a SmartApp to pull in the electricity price per Kilowatt hour and based on that create conditions to turn of the HVAC system when the price goes above a set price. 

No problem glad to help. If you need any help modifying it let me know.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...