5 AUTOMATIONS everyone needs to know in Home Assistant

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welcome back today we're going to talk about five automations that I believe that everyone should actually have running on their home assistant even if you don't use home assistant most of these and I'll say most of these are quite straightforward so you should be able to do them on different platforms but there's going to be a few in particular that really leverage home assistance power and if you're not into home assistant yet you'll probably want to find out a bit more there's a link in the description down below for my free home assistant course let's get straight into it and let's roll the intro when you're starting out with your smart home Journey the first thing is to get buying from everyone else in the family this automation will help you achieve that our first automation is the fridge is open it's a straightforward one but let's look at how we can do it what you're going to need to do is a fridge which I hope everyone has and a contact sensor I'm using an acara zigbee contact sensor in this example go navigate to settings scroll down and go to automations and scenes and click the button create automation I'm going to show you one I already created so go I'm going to go on to search search for fridge and I'm going to click on it so I can edit it and we can walk through what I actually did automations in home assistant are based on three parts triggers conditions and actions you're going to start with the trigger so triggers what's going to start the automation you will click on ADD trigger and go to state you can see these sort of a little triangle symbol once you've clicked on it you'll have this blank canvas to fill in I'm going to show you the one I already filled in previously so if you want to give this a name so this name here is going to be the name of your contact center so the cool thing is that as you type you can actually see the contact sensor and it's easier identified by this little fridge icon in my example and you can see it over so click it and this entity now will give you a few options so you'll have this closed and open so as you can see it will prompt you with the values that you need to use to set this up now um for when you test this I probably recommend you putting maybe five seconds why we've got five seconds so we don't want to avoid someone just opening the fridge every time they open the fridge get an alert so the four is the duration of time in which this event is occurring so for how long it stays open basically in simple terms maybe perhaps you want to set it as five minutes so once you've got that done I'm going to delete this example you can do that with three dot uh Delete and you can delete triggers and you can collapse them with this little arrow button and you can see it now it's pointing downward because you can expand it in the action section conditions are optional you don't have to put them all the way but today we're going to talk about one example where we do use conditions actions sender notifications so the simplest thing that I can think of is that it just sends a notification to your phone to actually achieve this you just need to install home assistant on your phone and just enable notifications in that regard uh so you would click add action and you would click this little bell icon call service so I'm going to show you one that I already pre-filled in so this notifications what how you get to this just type in notifications um and then you will get various options so it depends if you've got many devices in your home what you can do that there are more complex way of doing it but this video I'm keeping it dead simple so just suggest just do one phone at a time put your message in on the message a title is a little title and then there are other options that we can explore and if you are want to know more let me know in the commentation below and I'll support you and in the blog post you'll find more information also that's Linked In the description where you'll also get some of the yaml code that is behind it so you can compare it so what's this yaml code that I mentioned well yaml is just a configuration code that home assistant uses so here we're using the user interface but if you want to switch it around here animal you can go on the three dots and edit in yaml and you'll see the whole yaml code so if you wanted to copy and paste code you could just blank it out paste the code in and then the nice thing is that you can always switch back to visual editor so you can see it in this way so sort of easier for you to use this is really interesting for example if you want to like export your setup and send it to me in a comment section or on a Discord or any anyone else right it's good to know that there's an option to create the code that's behind what you're doing so once you've got all that done you need to press the save button and go and test it out yourself the first thing you can do to test it out is three dots run this will only test the action part you won't test the trigger part hence you need to probably take care of that also this second automation is uh nice to have it's a nice thing when you come back home you're getting a nice little personalized welcome message I'm going to show you how I'm achieving this so the first thing to do is add trigger and as before use the state I'm using an entity and I'm using myself I can see that I've got a person.geo so that's me so whenever I return home so technically the status values are not home and home and you can see them from over here but when I click on it actually gives you only Home and Away unavailable unknown these are the friendlier names for you to understand but in the background it's using not home and Home in fact if you've got the three dots and added in yaml you'll see that it uses those values that it sort of tells you of you can change also this if you don't like this name so you can like rename it and say when Geo changes from away to home that's not going to really affect anything these names are just for you so once you've got this set up you will put something around here so I am creating a text-to-speech so this will play some sound from a speaker and I'm using Nabu Kaza Services there are other ways that you can do this now because I either paid Cloud subscription uh really you know sponsored by home assistant or built by home assistant right so if you're into it you're saying you're going to be supporting the community and the project as a whole You've got a lot of benefits obviously as a dedicated video I made quite some time back or around this so you might want to consult it I might pop it up on the screen if I remember regardless of that what you do is you click you search for TTS on the call service and then you pick your speaker so you have you need to have your speaker integrated I'm picking this homepod and I'm just going to say welcome home simple message we're going to use this again you can't set languages like different accents so if you're um you don't know your particular language is different and you can set the language that will help it to give it the actual real intonation and accent right so save that and you're good to go another thing that I would suggest that you do is look at for example turning some hallway lights on third automation is preheating or pre cooling your home depending on your distance relative to your house so I say for example that you are a hundred kilometers or 100 miles away from home and then you start traveling towards your home that might take you two hours or whatever to get home so you what you want to say basically is if I am traveling so if my geolocation of my device tracker is moving towards my GPS launched and latitude location then I am traveling towards a location and you use that to trigger automation so what are we going to do for example say if my distance is getting shorter and shorter and goes below a threshold then I can start preheating or pre-cooling penguin which climate you live your house this is a little bit more complex so just ask questions if you're struggling file editor is what we're going to be using or Visual Studio code basically access to your configuration.yaml file in anywhere in the configuration.yaml file you need to copy can paste and write these things in as exactly as they are don't change the spaces don't change anything there's only one thing you need to change and this device tracker you need to use the device tracker that's relevant to your own system so if you use usual for your code it will auto complete and give you that information the tolerance is 50 and the 50 is based on the units of measurement so it could be 50 meters 15 miles 50 kilometers five kilometers after this video I'm going to be also testing it in the field so if you want to find out more like how well this actually works the proximity sensor to remember to like this video to spread it around but also really subscribe to the channel and comment and let me know down in the description down below if you actually want to see a proximity video sensor and review in more detail so anyway so once we've created this proximity sensor if we go are you going to save and then restart your home assistant instead to restart go to settings system and then click restart on top here now once you're in your developer tools that allows you to just understand what values you have you will have this new thing called proximity.home and the value so state will be depending on your unit or measurement the distance between where you're currently at and the location that you're using so you don't have to use your home once you've got all that set up at this stage you're ready to create your automation so you go back to your automations and scenes you click create automation you start with an empty automation you go to trigger so you do something very similar to what we did previously I'm going to show you an example of what I did already coming home preheating so I can click this what you need to do is is use that proximity sensor that you created this time we're using the numeric States you can see it's one two three we're not using the actual State and say when it drops under 100 and it's an arbitrary figure depending on what units of measurement you're using then we are also using the condition and in this condition we're using the statement which is disk button over here and in the condition we're saying that we want the direction of travel attribute to be towards so if you go to the documentation you can see that the direction of travel can assume not that arrive towards away from which is the opposite of towards unknown or stationary and you use that to really uh customize this proximity sensor so it will be you don't have to be in that status for one minute and then at that point you can just use your climate Center to set for example a desired temperature right so you can control whatever you want you can do many things right you're not just this but this is the third example I hope you enjoyed it let's move on to the fourth must have automation that everyone should have this next one here is going to be a bit of an energy saving feature turning all the lights off at the same time with one automation let me show you how we can do this so the starting point could be a time or it could be like no one's home but what I'm doing over here is something a little bit different to demonstrate so at 2AM I just arbitrary turn all lights off in case there's any like little LED light something that just stays on for some reason this is a capsule thing that you can actually do so you can click on a calendar for example if you want to do it like based on some sort of calendar event so click add trigger and you should have your time or time pattern and then you just put like a fixed time so you could say this is like hours minutes and seconds so like something like this will be 2 am and you can actually see it over here so when the time is equal to 2 am and then we're gonna put this turn light off all but all you know you sort of can't type it so if you're trying to do all of the entities and this I'm not able to type it maybe I'm not on the right version or latest version but the thing you can do is you can go on three dots editing yamo and you can add this you only need it once actually you can either Dash all under the end the ID and then if you save it and then you go back to your three dots here to your visual editor you'll see this little old thing and then you test it out it should work it works at least for me I will be curious to know if it doesn't work for you and why but you can just go three dots run and the lights will all turn off and it will be super great for your energy bills the last automation of today is more around a bit of security scaring people off a bit of a disclaimer don't use this just for your as your own means of security to protect your home a credit is automation called the police are on the way this is the first automation that has two triggers this demonstrates the point you can have more than one trigger in an automation what these triggers are doing exactly what it says on on the bot from off this kitchen Motion Center has a iPhone on and we go for 10 seconds so we need at least 10 seconds of motion for us to class fighter as a relevant motion activity then we have the patio those being from close off to open slash on and I put no time limit here because if someone opens the door closes it you don't have like it has to be open for 10 seconds you don't that's not this use case um so if the Pioneer sensor changes status and you assume that someone's up in the door and then the similar to what I showed you earlier if in the video about text-to-speech and vocal messages I have something quite similar to like this menacing message the police are on the way and you can put the volume up you can Flash slides and there's all sorts of things that you can actually do in home assistant to achieve sales but this is sort of because it's sort of a beginner video give you some ideas I'm keeping it simple one thing you can do instead of doing Loops uh I used to just to go wild copying and pacing and then in that way the speaker will constantly keep saying the same message other methods people reviews is just record a Long mp3 message or some sort of siren that goes on for like 10 15 20 minutes and then half the speakers play that there's a lot of options with what you can achieve with a home assistant basically so this wraps up this video I hope you enjoyed it if you want to learn more about home assistant you want to learn everything that I know about home assistant there's my courses section down below you can start for free with the home assistant version and then you can enroll in a membership you can either go for a monthly option or a lifetime bundle you can learn a lot of things like home assistant but not only networking building a media server Plex even how to fly a drone so I'm going to leave you with a video here on YouTube also to watch I'll see you in that one ciao
Info
Channel: Smart Home Makers
Views: 15,618
Rating: undefined out of 5
Keywords: home assistant, smart home, smart home makers, automation, home automation
Id: AsY1BmJAtCQ
Channel Id: undefined
Length: 14min 50sec (890 seconds)
Published: Mon Feb 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.