leonpc Posted November 17, 2023 Posted November 17, 2023 Obviously I am missing something but how does this node server work? I would like to use this to do something like the following If 2 weeks before Christmas then Turn on xmas lights But I do not see the holidays mapped. How is this suppose to work?
oberkc Posted November 17, 2023 Posted November 17, 2023 There are system variables for day-of-month, and month-of-year. For Holidays with fixed dates, one could use these variables in a program condition. Unfortunately, it gets a little harder for holidays that can have flexible dates.
Geddy Posted November 17, 2023 Posted November 17, 2023 @leonpc not sure on this one...haven't ever used it. Have you read the configure information? https://github.com/UniversalDevicesInc-PG3/holidays-poly/blob/master/POLYGLOT_CONFIG.md I know others have used the HolidaysGoogle in the past, but you have to setup a Google account to sync to on that one. In regular programming on admin console you can uncheck "daily" and it gives you calendar options you could put time from/to and include a date. You might not need to rely on a plugin at that point. I've got this one: ChristmasTime If From 5:30:00PM on 2023/11/23 To 12:21:12AM on 2024/01/01 Then Enable Program 'Christmas Lights' Else Disable Program 'Christmas Lights' Then let the "Christmas Lights" program control when things turn on/off.
tlightne Posted November 18, 2023 Posted November 18, 2023 @leonpc This is an example of how I do my Christmas under eve LED Lights with the holiday plugin. December Christmas Lights - [ID 00FA][Parent 0133][Not Enabled] If 'Holiday Controller / today Day Node' Month is December And 'Holiday Controller / today Day Node' Day >= 1 And 'Holiday Controller / today Day Node' Day <= 31 Then Run Program 'Blue' (Then Path) Else - No Actions - (To add one, press 'Action') 2
leonpc Posted November 19, 2023 Author Posted November 19, 2023 Thanks for all the replies. i have used other ways to set dates around holidays to turn lights on but they all seem to use multiple lines of code. Seeing the Holidays node sever I thought I could simplify things but reading the instructions did not make sense to me. I also looked at the HolidaysGoogle node server but it currently has an issue with connecting the node server to Google. @tlightneThanks this is what I was looking for.. I still have questions how to setup rules and define new holidays but it is a step in the right direction. 2
Solution firstone Posted November 22, 2023 Solution Posted November 22, 2023 On 11/17/2023 at 1:45 PM, leonpc said: Obviously I am missing something but how does this node server work? I would like to use this to do something like the following If 2 weeks before Christmas then Turn on xmas lights But I do not see the holidays mapped. How is this suppose to work? Holidays either come from python lib, which has a lot defined. https://pypi.org/project/holidays/. Or you can set up your own by date. With that in mind, above use case is not something this was written for. It's more like day based. Something like if Today is a holiday, do not lower thermostat. Or if tomorrow is a holiday, keep outside lights longer. The more important part is its dynamic. You can turn it on of off. For example, you can set up WFH for Mon and Fri. But I can say "Alexa, turn tomorrow on" and tomorrow will become WFH, running all WFH schedules. Something like that. For above use case I'd just use regular schedule as others have said. 1
leonpc Posted November 30, 2023 Author Posted November 30, 2023 On 11/22/2023 at 4:43 PM, firstone said: Holidays either come from python lib, which has a lot defined. https://pypi.org/project/holidays/. Or you can set up your own by date. With that in mind, above use case is not something this was written for. It's more like day based. Something like if Today is a holiday, do not lower thermostat. Or if tomorrow is a holiday, keep outside lights longer. The more important part is its dynamic. You can turn it on of off. For example, you can set up WFH for Mon and Fri. But I can say "Alexa, turn tomorrow on" and tomorrow will become WFH, running all WFH schedules. Something like that. For above use case I'd just use regular schedule as others have said. Thanks @firstone this makes a lot more sense. Now that I understand the intent I see many possibilities on how to use this.
Recommended Posts