Simple Automations / Restriction "Switch to Disable" question

Obligotory "recently moved over from Smartthings because REASON".

I'm attempting to utilize Simple Automations (vs RM, other) wherever possible to KISS. In coming over from the Smart Lighting app in ST, there is the idea of allowing an automation to restrict or execute based on a defined switch state being on or off. In HE / Simple Automtions, there is a similar idea, to restrict an automation based on defined switch being on. The latter implementation does not allow the same function as the former... as such, I'm finding several automations I have to run in RM because I cannot enable a Simple Automation to run based on a switch being on.

Am I missing something obvious here to allow for such cases within Simple Automations? I'm guessing this was a deliberate design decision for Simple Automations to have the restruction designed in this manor. Apologies if this has been explained elsewhere; I have not been able to find an answer.

Hmm, I might not be following you here. The Simple Automations app has several triggers that can be used to start an automation, including a switch turning on or off.

If you mean that you want a more complex trigger or evaluation of conditionals at the time the automation executes, then you may need rule machine.

Having said that, have you seen this toggle switch in the restrictions sub-menu of simple automation rules? If you toggle that switch in the automation's settings, then you can use whatever trigger you intended, but the automation will only run when the switch you assigned here is on. Is that what you were looking for?

Perhaps you can share screenshots of your simple automation and rule machine rules to describe more clearly what you're hoping to do and what you're having trouble accomplishing?

1 Like

Thanks for the response. Your screenshot highlights the exact function I'm asking about. As I understand that option, it allows the automation to NOT run based on a defined switch being on or off. I'm looking for a function that does the opposite: I want to ONLY RUN the automation based on a defined switch being on or off.

Are you saying that option does allow the latter example? If so, that is not intuitive at all based on the UI shown.

Can you share a screenshot of your simple automations rule that doesn't work the way you'd like it to?

Apologies, I don't have access to my mobile at the moment to share a screenshot, but I can provide examples.

A most basic example is any "turn light on" automation that ONLY executes if another specifically defined light (switch) is already on (or off). There's currently no way to do that with Simple Automations from what I see. I can make an automation that turns on a light (switch) if another light (switch) is turned on or off, but I cannot ALLOW an automation to run based on the state of a defined switch. However, based on the function you circled in your above screenshot, I can DISALLOW an automation to run based a the state of a defined switch.

I have historically utilized virtual switches to enable overrides for certain automations. For example: during non-waking hours, I disable certain lighting automations inside my home. However, if we have out of town guests staying with us, have a virtual switch "guest present" that I enable. With ST / Smart Lighting, I was able to utilize this virtual switch being on to enable certain automations that otherwise wouldn't be allowed to run duing non-waking hours.

I feel like this is such a simple thing that I've overlooked the function somewhere, or my thinking of how I have my automations laid out needs to be refined. However, this was a basic function in ST / Smart Lighting, and Simple Automation looks almost like a direct port of that on HE.

I'm not sure i see the difference..? :slight_smile:

NOT run when switch is ON = ONLY run when switch is off..

But anyways: i think it would be a lot better and easier to handle this with modes: Eg. create a GuestPresent mode, and use that as a condition under the "Only when mode is".. :slight_smile:

ONLY run when switch is ON. That's the logic I'm looking for, and that is not the same unfortunately. I guess I'm more surprised at the implementation here since Simple Automation looks like a direct port of the ST / Smart Lighting app.

I can absolutely invert the virtual switch logic, but I don't believe my WAF will agree with that implementation (rename the virtual switch to "Guest Not Present" and it is on 99% of the time?). And for that one example, I could absolutely make another mode... I would end up having to add a lot more modes though since things start overlapping. And in the end, this is why I ended up in RM because I could add this extra logic check that's not in Simple Automations.

I guess my real question now is whether this is worth a feature request, or if there was a deliberate reason why it ended up like this (as opposed to the ST / Smart Lighting app). On the flip side, I don't believe the ST / Smart Lighting app had the HE implementation either which is a DISALLOW option. Having seen the feature request that added the DISALLOW option, and coming from ST where there was the ALLOW option, I personally see the benefit of having both options available... but then we're getting more into the "advanced" rhelm of automation. Given the number of users coming over from ST, and this doesn't seem to have come up before from what I've seen, I feel like I'm squarely in the minority here. Time to start re-working logic.

Sorry if I misunderstand your problem, but...

I think you are over thinking this, the option to disable based on stat of a certain switch works exactly as you want, you just need to reverse think it in your mind. By assigning a switch to the option you just gave it a condition when not to run, then you decide if that condition is when it's off or when it's on.

So to have the automation run when the switch is on, all you have to do is select the switch and then put the slidder to off. The virtal switch will have to ON for the automation to run, just like you want.

1 Like

You're abolutely correct; the double negative that ends up being shown in the UI keeps throwing me off (switch to disable / disable when off) . Thank you all very much for hammering the point home and being patient with my questions / inability to visualize a double negative when I don't want to. :slight_smile:

4 Likes