#3: Input Booleans - Manual intervention
Automation Home Assistant

#3: Input Booleans - Manual intervention

William Zink

Okay! Well, Booleans are a data type in computer science that contain either a true or false value. It is named after George Boole who came up with the concept in mid 19th century.
Input Booleans in Home Assistant are a way of creating switches or toggles where you define whether the flag is either true or false. These 'flags' can have many purposes. I will list all of mine down below with some Node-Red Flows that go along with them so you can follow along. The only caveat with them, that I have found is that they are volatile, meaning if Home Assistant is restarted or goes down the previous state is lost forever.

TL;DR - I have a few ways to kick off automations manually. I list a few of my favorite and I ask what you use them for?

Automation Engine

Someone asked me once about my "smart" house, is it AI? or is it you? It just depends is always the tech answer but here is a list of all my automations where I have to kick it off. As a warning, I use Node-Red pretty heavily for my automations, so those flows you will see are Node-Red syntax for how they are triggered. If you have any questions feel free to leave a comment or email me! Home Assistant now has a native automations engine but when I started it was very weak compared to Node-Red and never had a reason to migrate back.

My Switches (input_booleans)

So now we know what an input boolean is let's talk aboutinput_booleans are a Home Assistant integration that lets you define a toggle.
Home Assistant Integration Page although you will find my layout a little bit different. This is just due to me preferring separation rather than one giant config file. 95% of these will begin an automation in Node-Red. I will note if it doesn't. So going down the list in alphabetical order...

1) Authorized Entry (authorized_entry) - This boolean is on my home screen and very useful when I am out of town (or I forget to do something) and I can quickly give a friend access.
So once I activate this I can check in Node-Red if that flag is set through all of my automations and see if this is true then I don't have to send alerts that my house is being tampered with.
Also when I flip this switch it will unlock the door and also turn on the lights. When I turn the switch off it will reverse and then all the nodes will go back to alerting.

2) Blind Override (blind_override) also known as I went to sleep too late - This one is used to stop my blind automations. I will go over my blind automation in more detail. But anyways, sometimes you just want the blinds  in a certain position.
Also, when it's time to go to bed. I use a Hue Tap to signal that I'm going to bed. This will check what time it is and set this to value to true if it's past 1:55AM. I learned this one through PAIN waking up and it being BRIGHT outside and I just wanted one more hour of sleep but it was too late. Morning ruined... So learn from my mistakes.

Morning routine to start warming up the condo and checking to see if the input boolean is true
Demonstration of me checking that value before the blinds are called to move

3) Fan States (fan_bedroom_state / fan_living_room_state) - This is used to track the state of my two ceiling fans. I purchased two Fanimation Odyn custom fans, one for the bedroom and one for my living room. I also added the Wi-Fi Module and went with the 72" blades in black. I liked the spec sheet of these fans but they aren't as smart as they claim to be. There is no local API control which bummed me out especially for the price. I have emailed them multiple times to get some local support but to no avail... Fan Blog Post (#4) for more information!

Automation where I check if it's cold outside, if it is, don't turn on the fans!

4) Go to sleep (go_to_sleep) - This is a very simple boolean that just allows me to control my go to sleep routine from my phone. Sometimes I like to take a nap on the couch and I'm not close to my Hue Tap. Or for whatever reason I'm on my phone and too lazy to reach over and hit the button.

Go to sleep routine, as you can see it sets the blind_override at 1:55AM

5) Guest Override (guest_override) - In a smart house, I feel that this is absolutely necessary. In the flip of a switch I can make the smartest condo into the dumbest one. It is nice when people visit they don't have to be intimidated or if I have people staying at my place I can just turn this on and they can do the usual flip light switches and go about their day. Then in each of my Node-Red integrations I will just ask (is guest override set to on) if it is then don't continue the flow. Locking the door is still automatic, as most of the time my guest will have a key.

4) Sexy Times (sexy_times) - Do I need to elaborate?

5) SONOS play status (sonos_play_status) - The other day I came across someone on Reddit who had a phenomenal guide using RFID tags and handing the music from the phone to SONOS. Guide here if you are curious. I HAD TO DO IT! But I did notice after I got the initial thing working that I wanted to make some additional improvements.
NTAG215 RFID tags
After I got everything setup it worked pretty well but I don't exclusively use airplay, I mainly use Spotify and the SONOS S2 App. But his solution only concentrates on Airplay. But I knew I could get multiple systems working together. That's what I do for a living! So I began...

Complex automation to give me the sound either from the SONOS app or Spotify App if it's on airplay

As you can see I added the SONOS integration in Node Red and the Spotify integration and I'm able to query SONOS what it's currently playing. If it's Airplay then do not continue. If it's SONOS app get me the URI and play that song through Spotify. This is still in the infancy of testing but it's been going well so far.

6) Upstairs mode (upstairs_mode.yaml) - Our pool and gym is upstairs, so I have a quick trigger that turns this value to on if I'm upstairs. This value is also nice because I can temporarily disable my GPS tracking in Home Assistant and Node Red to save some computing power. GPS is very hard living in a building as it doesn't have a great idea where in the building you are.
I have a SONOS Move and I have device tracking enabled on my router. With this I am able to know if this SONOS is on my network. If it isn't then I took it upstairs to enjoy some tunes at the pool 😎
But if I want to just go to the gym I can flip this switch or tell Siri, I'm headed to the gym and this will be flipped to true.

7) Vacation Mode (vacation_mode) - Again another quick flip and this will suspend all notifications unless they are important. If a battery is dying at home it can wait until I get back. But if someone opens my door and I'm not there I will turn on a camera feed and call security ASAP! Unless it's authorized. An additional benefit of this is when I turn it on, it will send me the TSA wait time and the current drive time to the airport. Which is extremely helpful.

When I come back from vacation (it will alert me that things have returned to normal! Here is an automation to warn me if it is going to freeze so I can prepare the plants, again. Not useful when I'm out of town.

Conclusion

There are a few times that flipping a switch will get you your desired result and you can turn it on whenever you want. Here are my 7 and what I use them for along with the automations that surround them.

Question?

What are some of your ways that you interact with your setup manually?

My answer?

Above!