Global Date Variables

Hello,
Iā€™m trying to reproduce a webCoRE piston in RM. On my Inovelli Red Series dimmer, I set the LED color based on the garbage/recycling schedule. Garbage is normally Monday/Thursday and Tuesday alternates between plastic and cardboard. Exceptions are when a normal pickup falls on a holiday, then we have an alternate day.

Is there a way to keep a global date variable, possibly as a string since I donā€™t see a date type but somehow be able to do date math?

Since you're working effectively with a 2 week repeating schedule, you could create a global number and each day at 12:00AM increase the number. Then when it's 2, 5, 9, 12 turn it on for garbage, when it's 3 turn it on for plastic, and when it's 10 turn it on for cardboard.

I'm not familiar with WebCore so I don't know how to compare it to RM

This is the sort of thing I'd be more inclined to use something like Google Calendar for. Hmm that's a point - is there any way to use notifications from something like Google Calendar as triggers to HE rules?

That could probably work. Iā€™m guessing IFTTT could be a bridge between Google Calendar and HE. Iā€™ll definitely check this out. The benefit is that I can easily mark the correct days when the schedule changes due to holidays, and just have a rule run each day to see if thereā€™s any garbage/recycling pickup. Thanks for the suggestion!

Just an update that using IFTTT with Google Calendar is working perfectly for this task. I have to admit, it was so easy to setup recurring events and then make a few adjustments based on the occasional change in schedule around holidays.

2 Likes

Thanks for the update :slight_smile: