Running State

Hi,

I am wondering on the best way of achieving the following. In a nut shell I want Home Assistant to be aware of the state it is running in and configure accordingly. Example of states could be

Normal - normal behaviour
Vacation - when on holiday etc may want different behaviour
Nighttime - at night you may require extra alarm etc being active

So each of the different states will influence the automations that are active etc.

Is there a good practise to achieve this or can anyone recommend any solutions.

Thanks

Steve

You create input_boolean toggles in the Helpers part of the UI (Devices and Services) and then you create some automations to turn those toggles on and off based on what you need.

For example:

I have a lighting node mode toggle, so that lights don’t automatically come on during the day.

I have a house in night mode toggle so that lights come on at a lower brightness level when people are sleeping.

I have a workmen mode toggle so that if people are in doing work, lights stop switching off automatically.

Vacation mode can be controlled a number of ways, from a Home Assistant calendar that you create specifically for tracking when you are on vacation, to checking your Google Calendar to see if you are on vacation.

What would you like to accomplish?

EDIT:
As for influencing what automations are active, rather than turning automations on or off, it’s better to limit them running using conditions.

Or for more complex automations, where conditions aren’t enough, use the choose action, and then you can have much more fine grained control over what action is taken based on what toggles are on and off.

1 Like

Thats great Andrew thank you for your response.

1 Like

Or, in a slight modification to what Andrew suggested, you can use Input_Select instead of Input_Boolean. For example, I have a helper entity called “Home State” that has the values “Morning”, “Day”, “Evening”, and “Night”. I cycle through these based on time, sun conditions, or user inputs, and many of my automations have this state as a condition. But I also use input_boolean for things like “It’s Dark Outside” and “Vacation Mode”.

1 Like