Stay / Away - Automation Control

So I’m trying to create a dashboard view button to toggle automations on/off that are assigned with the security category, but I only can find methods to possibly do it with an input Boolean entity (true/false) added to each automation…

However, when I create an input Boolean helper entity, and add the template condition in each automation for that input Boolean to be true, then toggle it in/off, it is not working as expected.

condition:
      - condition: template
        value_template: "{{ not is_input_boolean('input_boolean.disable_automations') }}"

The goal here is to be able to toggle on/off multiple automations that have the security category assigned when I am away versus home (stay) with a single button.

Any guidance would be appreciated!

is_input_boolean is not a function. You want is_state("input_boolean.my_thing", "off").

Please use the Template tab of the developer tools in HA desktop to test your templates.

1 Like

Thanks for responding!
So like this in my automation?

Wrap it in double braces {{ }}. No braces = no rendering of the function.

Please read documentation of templates.

1 Like

I did read the docs and search this forum before posting my question. It was not clear to me. I even used AI for assistance…guess I have to read it again :-/

So this is what I have now to notify me if door opens during time condition OR specific template is true:

Is this correct?

Is that what dreamed up is_input_boolean? Not really “assistance” then :roll_eyes:

Why not use a simple entity state condition? No need for a template here. Conditions are AND though: if you want OR put them both in an OR building block. I don’t think you do want OR though.

I used AI to supplement what I found in docs and in forums, just resourceful that’s all :wink:

I don’t believe a simple entity state condition will meet my requirements I originally stated, which is, a button on my dashboard to toggle on/off multiple automations when I’m away.

It will. An entity state condition that checks the state of the input_boolean is equivalent to the fixed template that you have.

You mean hallucinate functions that don’t exist, causing yourself and us more work as we figure out what’s going on? AI is poor at HA coding.

1 Like

Thank you for explaining, I will try it if its a cleaner way to accomplish my goal.

1 Like

If I’m not understanding something after going through the docs and any related forum posts, then it would be shortsighted to not also ask AI.
We don’t need to continue to press me on this. I’m learning HA, please be patient with me.

These two achieve the same outcome right, so is there a right and wrong way vs. working harder than smarter? LOL

Don’t see it as a criticism of yourself, just advice that AI has been shown many times to be bad at HA stuff.

Recommend you don’t rely on it or at least declare where it has contributed to what you currently have. Ask the forum first :slightly_smiling_face:

The template way is, as you have demonstrated, harder to construct in the UI. They give the same result.

2 Likes

Thank you all for the help :pray::+1::handshake:

2 Likes

That explains the hallucinated is_input_boolean.