Jump to content
C4 Forums | Control4

Trapping an "off" tap on a keypad


Recommended Posts

So I have a keypad with six buttons that don't directly control lights, they are used to trigger macros/events for Sabbath light and house programming.  They are







If you press Shabbat all sorts of variables/macros run, and the LED for Shabbat goes to "On" (and the default of 11:00 is chosen - this is for when lights start going off).

What I can't figure out is how to have a second press of the button run Macros to take the home out of "Shabbat" mode.  Here is a screen shot of how the "on" code works.  I want to be able to just press Shabbat again to turn it off rather than use a button for "Off".


Link to comment
Share on other sites

Create a variable, "Shabbat"

In programming select the variable "Shabbat":

When variable Shabbat changes
If variable Shabbat is true
Copy and paste the commands that you currently have on the press of the button
If variable Shabbat is false
Create the commands that you want when turning Shabbat off

At the button
When Mud Room-Pantry Left Shabbat button is pressed
Toggle variable Shabbat

Link to comment
Share on other sites

My installer hasn't yet installed the driver that Alan wrote.  Also, there are times (particularly in the summer) when you "bring in Shabbat" early.

Thanks for the tips, I'll write the boolean code.  I was hoping it was built in somewhere.

Link to comment
Share on other sites

Our Shabbat driver inputs your latitude, longitude and country code into the hebcal webservice.

this returns when candle lighting and havdalah occurs exactly for that period (it shifts at different times of the year eg over here it's after 8).

it does the same for Jewish holidays that have similar requirements.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...