Triggering multiple ways based on dimmer change


#1

I have a piston set up based on the Lutron Caseta pico dimmer at the top of my basement stairs: when the level changes to 2% (which is how I have the favorite button programmed), turn off all the lights in the basement. It also changes the level of the stairs lights to 50% before turning them off, so that they turn back on to that level if you turn them on via Alexa. This has worked well so far, but I’d love to make it work both ways:

  • if the stairs dimmer is OFF and you press that button, turn on all the lights in the basement
  • if the stairs dimmer is ON and you press that button, turn off all the lights in the basement

Right now, it doesn’t know the difference, so as long as it changes to 2%, it’s going to turn off all the lights. And I don’t necessarily want to mirror all the basement lights to that switch — I just want that one favorite button to function as an all-on / all-off button, if possible.

Is there a way for me to capture whether the dimmer was previous OFF or ON before the change to 2%?


#2

I’m not familiar with the lutron dimmer, I’m assuming its zigbee/zwave.

Could you store the previous status (on/off) in a variable?

You may be able to use something like this too


#3

How do you currently turn the lights on?


#4

Either with the switches/pico remotes or w/ voice (Alexa).


#5

Thinking out loud here… to turn off the basement and stair lights the pico button goes to 2%. What happens to the pico dimmer level when you turn on the lights with the switches or Alexa, does it stay at 2% or does it follow one of the lights?


#6

With the switches, it either turns on to 100% (if you press the top button) or starts increasing from 0% (if you press the dimmer-up button). With Alexa, it seems to go back to the previous level, which is the reason I have that piston change the level to 50% before turning it off, so that it doesn’t turn back on to 2%.


#7

Please post a green snapshot of that piston.


#8

I thought I had included it in my original post, but here:


#9

Sorry, just getting back to this. I’m trying to work it out in my head but I end up with more questions than piston design lol.


#10

Haha, what other questions?


#11

If you want to do an all-on, what other possible levels or switch states could the Basement Sitting Area Main Lights, Basement Exercise Area Main Lights and Basement Stairs Main Lights be at?


#12

Sorry, I’m not sure I understand the question. I presume those lights could be at any combination of levels (with the exception of the Sitting Area which is on/off and not a dimmer).


#13

I’m guessing you’re using the pico on hubitat? Do you have a piston that catches button 3 event that sets the level to 2%?


#14

It’s not hubitat, no. It’s just smartthings (and the Lutron bridge). Button 3 is a “favorite level” button and I just have it programmed to 2%.


#15

So I think I may have figured this out, in a relatively hacky way.

I updated my “turn off lights” trigger to only fire if the lights had been on for at least 2 seconds:

And then this is the “turn on lights” trigger:

Seems to work!