Outrageous Automations
There are a few home automations that took me a while to figure out a good solution for, and I’m going to show you how I did them.
If you haven’t watched the video that goes with this article, go check it out here to understand how the automation works and see it in action!
Easy skip automation
I’ve had different input booleans (or virtual switches) that can be turned on to skip an automation for a long time. They are super handy, but not always ideal for family members to know how to turn them on. Until now!
Home Assistant (HA) can tell the difference between a manual on or off using a physical switch, in the app, or if the automation changed the device.
This is perfect for knowing if a family member manually changed the lights, for example. When they are manually turned on or off, then I can turn on that input boolean, to skip any light automations in that room for the day.
Here’s how to tell if how a device is controlled. There are three choose conditions: physical device, HA app, and an automation. As you can see, there is an input boolean turning on for only the physical device and HA app option.
choose:
- conditions:
- condition: template
value_template: "{{ trigger.to_state.context.id != none }}"
- condition: template
value_template: "{{ trigger.to_state.context.parent_id == none }}"
- condition: template
value_template: "{{ trigger.to_state.context.user_id == none }}"
sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.skip_automation
alias: Physical device
- conditions:
- condition: template
value_template: "{{ trigger.to_state.context.id != none }}"
- condition: template
value_template: "{{ trigger.to_state.context.parent_id == none }}"
- condition: template
value_template: "{{ trigger.to_state.context.user_id != none }}"
sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.skip_automation
alias: HA user interface
- conditions:
- condition: template
value_template: "{{ trigger.to_state.context.id != none }}"
- condition: template
value_template: "{{ trigger.to_state.context.parent_id != none }}"
- condition: template
value_template: "{{ trigger.to_state.context.user_id == none }}"
sequence: []
alias: HA automation
For the automation trigger, just make it a light turning on or off. Then you are good to go!
Real life Jarvis
I wanted to make an easy way for my smart home to ask me if an automation should run. Then all I have to say is the the trigger word and “yes.” Then it would know what automation to run, out of a long list of automations it could potentially run. So here’s how I set it up.
I created a “drop down helper” or it is also called an “input select helper.” This will be a list of growing automations that could run with this voice command. I also have one option as “none” and that’s important.
Then if a certain conditions are right, like if it’s bright in my room, I’m in the room, and the “input select helper” is “none,” then the automation will ask if I want to lower the shades. That automation changes the “input select helper” to the automation name i.e. “lower back porch shades when bright.”
I have another automation that I call my coordinator for all them. The trigger for that automation is all the voice phrases: “yes” “sounds good” “execute order 66″…etc. Then for the actions it is one big Choose that check what the “input select helper” is. If it’s set to “lower back porch shades when bright” then it will run that automation.
I also have one more automation that if the “input select helper” is NOT “none” for 2 minutes, it changes it back to “none.” That way it gives me a minute to respond, but if I don’t then it will skip the automation and if someone randomly says “yes” it won’t run an automation when it’s not supposed to.
More automations
There are some other automations I’ve covered years ago like the doorbell one. If you want more info, you can check them out here.
If this content is helpful, then please subscribe on YouTube for future automation videos!