Use Var to remember last setting?

My son is moving to a new house and was thinking of installing Luton Caseta switches, but wants a last dimmer setting. I know they don’t do this on their own, and the higher level ones that do are (IMHO) crazy expensive.

Could Rule Machine capture the setting that a switch was at when the Off button was pressed and then use that setting for when the On button was pressed?

As a side not you could do an initial dim point (press on once and it goes to a set dimmer point press twice and it goes to 100%) directly on the switch

I'm not 100% sure how that would work, as I thought Lutron Casetas don't have multi-tap unless you could capture the time it was pressed and then if within X time a 2nd press came in or I guess you could have a variable that you set to zero when off pushed and then set to 1 on first press and check if variable = 1 and on pressed you could then do something. (And then reset it to zero). Now that I'm thinking about that, I guess you could use this 2nd method to maybe simulate a double tap for any switch. Hmmmm. That could have real possibilities.

But, back to the issue at hand, my son doesn't want a "favorite" position, he wants it to turn on to the last setting. So, is there any way to capture what the last setting was and then use that when turned on again?

I have a few of mine set this way. One push does the limit I set, second does 100%

Thanks, But is there anyway to capture what it was last set at?

As you specified in the original message, I think you could probably create a variable to read the switches last level and then create a rule using that variable...I'm not good enough at RM to do that which is why I asked if the other thing I posted would be good enough...

Yes, you need to create a variable to save last setting.

Thanks. I went into Rule Machine to see if I could create a simple rule as a simple test with a variable and an if statement, but couldn't figure it out at all. I know you said you're no RM expert, so I'll poke around a bit to see if there is a good RM tutorial.

Go to Settlings/Hub Variables. Crate a number variable. Here's my variable page:

Then go to Apps / Rule Machine, create a rule. Here's my example of every time my porch motion sensor goes of it add +1 to the PorchMotionCount variable.

So you trigger would be a dimmer change.
Your action would be to store that into the variable.

Add tile on dashboard and select the variable connector.

Woo hoo! As I was creating the rule I realized I didn't need a variable at all. I'll put in a screen shot below.

What I wanted to do was to create a toggle with a button on my Fibaro KeyFob so I don't have to use a button push and a button hold. The rule I created says that if button 5 is pushed (the one that looks like a minus sign) it tests if either of my 2 Neo plugs is on. If so, it turns them both off. The Else (which means they are both off) turns them both on.

(BTW, when I did the screenshot they were off, which is what the orange (F) (FALSE) means.

So one last thing (for now :-)): How do I capture what value a dimmer was set to when it was turned off (or what brightness the lights it controls was set to) and then use that value to set the lights when the switch is turned back on?

Store it in a hub variable and use rule machine to pull it and store it. Example of number variable above.

It took a little poking around but I got it figured out as to how to 1) create the hub variable ("hv"); 2) Go into Rule Machine and have that hv get written to any time the dimmer level changes on my desired switch; and the 3) use the hv to set the dimmer level when that switch is turned on. Woo hoo!

Not sure why you need this. My ge switches as long as you are doing a simple on/off come back on at last dimmer level ?

In fact i had to write a specific rule to turn them on and reset dimmer level to 100% early in the morn just so they wouldn't be left at the 15% that was used for motion late at night.

Lutron doesn't really do that, that's why he's writing the rule.

1 Like

Rlithgow1 is correct. The Caseta line of Lurton switches can’t do this. My Inovelli switches do, as do the ones in the home my son used to live in. It seems surprising that for such an expensive switch it lacks many features of much cheaper switches. But, and it’s a huge but, everywhere I look people all swear by how whole rock solid and dependable the Lurton Casetas are.

Since I don’t have any I’m not in a position to know, but what I do know is that for whatever reason, every now and again any device that isnt directly hooked to a load takes a while (20-30 seconds) to activate. I’m not sure if this is a Z-Wave issue (which is 100% of what I have) or a Hubitat issue. I guess if the later, then depending on Hubitat to run Lurtons would defeat the purpose of going with Lurton. Perhaps someone with Lutron switches used with Hubitat could weigh in here on that aspect of it.

Can you post your z-wave details page? It shouldn't take that long with z-wave. Something else is fundamentally wrong.

Here is my Z-Wave details page. BTW, I tried to do a Repair on a couple of the slow devices to see if the route would change as I have 2 Aeotec 7 range extenders very close to some of the slow devices, but that never seemed to change the routing.

Also, some of the slow devices are in 2 gang metal boxes and 1 is at 100 and the other at 9.6. (And, BTW, I can't change out the boxes for plastic as I live in a condo). Finally, I did move my hub a few weeks ago and that did greatly cut down on the 9.6 and boost how many are at 100, but I do see some go back and forth in speed between those 2 extremes.

And finally, while most of the time it is fine, just every now and then something takes incredibly long. It aslo seems that once it comes on if I repeat it right after it is fine. It is almost like something is asleep, but I know that isn't supposed to happen with my mains powered devices. I've often wondered if Hubitat or Z-Wave is doing some housekeeping and it has to finish before doing my command. I've never been able to figure out why some random switch behaves like this.

1 Like

Yeah lots of slow devices. For the slow devices next to the repeaters, I would exclude them then re pair them. That should force them to the nearer repeater. Likely those 9.6kbs ones are what's slowing your mesh down. So many route changes on those too...