OK - I've implemented a solution that makes sense to me and is reasonably efficient to implement. I'm not sure if this is optimal, but I'll post in the hope to help anyone else working on this type of issue.
Essentially, what I want is a set of scene's and programs that would enable multiple buttons to change what I might call the "states" of the outside lights. There are five different states:
- Landscape state
- Party state
- Cleanup state
- Patio lit state
- Off state
Some of these states require the security light to be on or off...
What I ended up doing was the following:
- I ended up making the following setups for the keypad A-D buttons
- Each button was changed to be non-toggle - on (i.e. when the button is pressed, it only sends an "on"
- A-D were made to be mutually exclusive through the use of scenes
The way I implemented was:
1) Set the A-D buttons to be non-toggle (on only)
2) I setup a state variable that would indicate the 5 different states
3) I set a program for each of the A-D and the Off buttons that had the following programs setup (note, for a-d - the check is for an "on", for the off button it's an "off" - just sayin):
if
control keypad1 [a] is switched on
or control keypad2 [a] is switched on
then
$OState=1
(the OState variable is one of 5 values 0 -4)
I then have a program that has if $OState=1, set a scene to on.
Finally, in that final scene, I set each of the keypad and other switches appropriately.
The key for my thinking and processing is that scene is only ever turned "on". Most scenes will, as far as I understand, be turned on, or off. If you only set the scenes to turn on, it makes the management of which KPL buttons are turned on or off significantly easier. Since we look at the KPL as a toggle with one of five states (off, or one of the four settings), this works wonders and it's easy to implement.
If others are interested, I can post more code, but I'm not sure how to copy and paste the code into a text based editor (simply have not looked into it - it's possible that a backup of the programming would provide me with that text info)...
Gotta go, my battery is about to die ...