2 rules off same trigger

What I basically want is:

If button pressed THEN
Turn off lights x and y
Turn plug x off
IF sensor 1 is closed AND front door locked THEN
Flash light z green
ELSE
Flash light z red
Endif
Endif

If I could only see the coding I could sort myself out,but I don't know where to find that. All I get are the buttons to choose

Do you want this to be one rule or two? For the condition you need to specify the button number. If it only has one button then the button number will be one.
Here is the button code. I can add the other logic to this if you want just one rule.

Why don't I see the coding view like you? If you look at the attached pic, mine doesn't show me any logic statements, just what is happening.

Are you selecting 'conditional actions' under select actions to run and then you will get a drop down menu on the right.

1 Like

you need to select button "device" as the trigger.

Maybe I'm not understanding what they're asking. He has the button as the trigger. I think he needs help setting up the conditional logic.

yes that's what i think @AlanB think's .

@AlanB see example (i can't flash)
edit: missed the else

just a note there is no "THEN" for this the button press is the event / trigger that will fire the rule.

Won't 'toggle color' turn the light off if it's already on? Doesn't he want to 'set color' with a delay to get the flash effect?

was just giving a example i don't have any devices that can flash, same as i don't have any locks hence i used mode instead.

2 Likes

Thanks all. I think I'm just missing the conditional button. I'm not home now but will check later and yell if I'm still not coming right.
Thanks for all the help

it's the very 1st option

conditional actions

This should do what you want. You can play around with the repeat to get the flash closer to what you want.

Flash is capability of some fitting, so should he want that it would be best to use that rather than a repeat (less network traffic). Not sure if it's a custom action or a standard.

I understand that flash is a capability. This will do what he wants, I have no idea what devices he has and what they support, I think he just wants to indicate the state of the door and lock. I wouldn't be worried about the traffic in this case but that's just me.

@AlanB If you are truly looking for flash capability there are a number of posts on this topic. I listed a few below. The native Hue driver doesn't support it but I think maybe @bertabcd1234 CoCoHue does. I haven't had time to setup CoCoHue so I'm not sure about that. I only have Hue bulbs so I can't speak to any other type of bulb.

1 Like

Should have clarified that. I mentioned it because I have tried to make things flash but it's hard to get correct because different things can handle fast commands well or not at all and crap out mostly ZigBee LL lamps. But one with the command work differently i.e it's the device itself that is doing the flashing rather than telling it to turn on, off, on, off

CocoHue does indeed support flashing, and it's done by the bulbs and not repeated commands to the device (but due to how Hue implemented this, it will stop after 15 seconds, so you'll still need a loop to keep going if you want more than that).

On Hubitat, flash() is a sort of "unofficial" command. It's not part of any standard device capability (I'm using that term here in the Hubitat sense, where capabilities are the documented sets of commands and attributes devices must support if they declare a certain capability). The only way to know if your device supports it is to look at the device page. Rule Machine will show you all devices with the "switch" (on/off) capability since that's the closest you can get to a list of devices that might support this using a standard capability. That's why not all devices you can choose will actually work. How this works if it's implemented is up to the driver and device. Ideally, the device supports something natively and the driver just activates that. However, contrary to the above assumption, some drivers "fake it" with a loop/timer of their own, as you can see by looking at Hubitat's Generic Z-Wave Switch driver.

3 Likes

Thanks for all the advice. I was looking in the wrong place. I was looking under conditions and not setting the action as a conditional action. I will play with that now.
The flash I was referring to was just a one time flash red or green to let me know if the doors were closed, not needing to loop it, but thanks for the info anyway. I'm sure it will come in handy.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.