Using the same button twice in a Rule?

We have an older dog that needs to go out many times a day. She is also very quiet, and won't bark when she needs in, she just stands at the back door.

The solution I would like is a red Fibaro button stuck to the glass you can slap when you let her out, (which will make the lights in the kitchen and upstairs hallway flash) and then slap again when you let her in to restore the lights to their previous state.

Is this possible?

Sure, just use a Boolean variable to keep track of which button press it is. And then Conditional Action based on which one...

That looks like this to me:
Σίγουρα, απλά χρησιμοποιήστε μια δυαδική μεταβλητή για να παρακολουθείτε ποιο κουμπί πατήστε το. Και μετά δράση υπό όρους με βάση ποια...

Anything to point me a little more specifically in the right direction?

1 Like

If it gets out of sync, you'd have to set the value of the variable by opening the rule and setting it to what it should be (true before ever being used).

1 Like

Thank you so much for helping me with this....

Ok, what did I screw up?

and..... I guess I should probably be setting the level of the dimmer before it starts flashing, but after the capture?

Move the "Capture" inside your IF statement section as the first action, so that it doesn't capture the Flashing state the second time you press the button.

2 Likes

I can't figure out how to get my "END-IF" statement to match yours. What is the Action Type I should be choosing? (and other choices that are likely to trip me up) :pray:

END-IF shows up as a button in the UI and is under Conditional Actions also.

Did I get to the correct place for that END-IF statement? And if "yes", which do I choose?

image

Select 'logical' and then NOT.

1 Like

Hot diggity, that did the trick! Thank you so much for your help.

And Twiggy says thank you as well

3 Likes

I used this as a template to make a second rule that acted upon the same button push...

If it's between sunset and sunrise, capture the state of the dining room dimmer, set the dimmer to 100%, and then restore the light to it's previous state when the button is pressed again, and it worked fine for months. Then a little while ago, it started to get out of sync with the "flash the kitchen nook dimmer" rule. First press would start the kitchen nook dimmer flashing, second presss would restore the kitchen nook dimmer, but also turn on the dining room light, and a third would turn the dining room light off, but also start the kitchen nook dimmer flashing again.

So I decided to try to combine both into one rule... and now nothing works.

What have I broken?

Your variable is false so the rule doesn't get past the first IF. Why do you need that variable in the first place?

Because you suggested it?

It is out of sync, right? I can't say that I remember what is going on...

Some part of your combined rule must have an ELSE part, for when the first IF is false.

1 Like

When it was two rules, it was out of sync. But now that I've combined both together, nothing happens when the button is pushed.

This

If I'm understanding this correctly I think what you want is to put another END-IF before your ELSE statement.

Yup, that did it! Thank you.

1 Like