My top 5 contact sensor automations in Home Assistant

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] there's a ton of different contact sensors out there I I picked up one from a Cara and a generic 2-year zigby one as well I'll have links down in the description for both of those the um the only difference between the two seems to be that the car one comes in a massive box with loads of empty space for some reason uh other than that they're pretty similar so they have these lines on them that show which sides is supposed to connect and as they move together they close the connection and when they move apart they open the connection and you can read that in home assistant and and do Things based on those States they're pretty similar in terms of what they Ser up you get things like the battery percentage this is the aara one we're looking at over on second tab we've got the tior one so you can see uh we've got battery percentage on both of them also things like whether the contact sensor is open or closed uh which is its primary function and you get other things as well that are exposed to uh things like the volage on the ter one the voltage on the aara one one thing that you do get on the two1 uh which you don't know on the aara is this tamper indicator and it indicates whether it's it's been not just opened but whatever it's being tampered with um which is quite useful for things like if you want to check out my video on how I made a security system using home assistant it's useful for things like that you can set up as a tamper sensor instead of a contact sensor all of the applications in this video today are just using it as a contact sensor and not using it as a tamper sensor this is the first one we're looking at and this I think is what home automation is all about uh it's too much effort to have to tick something off on a task list once it's been done every day so there's this little toggle here you can see it this is on our dashboard that we have in hallway and it says whether the fish are hungry or whether they've being fed and this is just driven by a contact sensor on the fish tank so we don't even have to worry about ticking off it just knows when it's been done and the way that this is configured is by a little input helper that I've got here so it just says whether the fish have been fed or not and it that's literally what it is it's just an input boole in um and then when that's turned on it has this state in the dashboard uh to say that they've being fed and when it's off it has this state to say that they're still hungry let me just dive in to what the dashboard looks like so we can see um I really like these mushroom cards so it's using one of those mushroom cards and it's just monitoring that input Boolean whether the fish have been fed or not um and all it's going to do is if if they have if it's set in a state that it's on it says that they've been fed otherwise it's going to say that they're hungry so you get this kind of State on the right here and all it's going to do as well is change the icon as well we've got a fish and a fish off icon uh that corresponds with the state that I want to see on the card uh looking at it now I should probably change that icon cuz it looks a little bit like the fish has been uh yeah we're going to change that but something for later um the other thing that is happening is we have some automations and all that happens is when the contact sensor changes to open it will literally just set that input B in and turn it on and that is what drives this state so it's a really really simple automation there's some other automations as well because obviously at the beginning of the day when you open it up you want to make sure that it resets so we have this um this config that has a daily reset in it and all this does is at midnight it's going to go ahead and call the turn off input Boolean uh service to turn off that particular Helper and it's just going to reset the fish have been fed which will put the put the state back to to here at midnight we wanted to make sure the roof was well it when we went up there so we put a little contact sensor just on the door so it can register when it's been opened so one of the first things we did when we moved in we we added a ladder so that we could get up in the roof super easy super low friction so that it just becomes an extra space that we can store stuff you can see that when the light comes on uh it's incredibly messy but also we can see what we're doing and this this light strip runs for the entire length of the roof so we can see up there the automation for the roof is is really easy it's it's literally just when the door sensor opens or when the door sensor closes uh it triggers the Automation and then it will conditionally execute this action so it's just checking if the door sensor is open then it's going to turn the light on which is fairly straightforward at full brightness and then when it closes it's just going to turn the light back off that's literally all it's needed and this is all that's all that's required just for just under £18 you can get the entire C strip uh it's 5 m comes with a plug comes with a zigby controller I'll leave a link down in the description where you can pick one up then you just need a door sensor again £7 if you're paying over a 10er for these then you're probably paying a little bit too much we have a contact sensor on the freezer this is just so when we open it it can light the way so we can find whatever we're looking for maybe a Cornetto or a flake or something and when we close it the light goes back off but this is really cool because it means that we know when the freezer is open and we know when the freezer is closed so we can make an inference like if we've left the freezer open for 15 minutes then we should probably alert around the house that hey did you mean to leave the freezer open maybe you should go and close it and that's exactly what this automation does I take my health pretty seriously and that includes not sitting for too long so I have a contact sensor on the side of my desk and when it's been closed for a long time infers I've been sat for a long time when it opens up it infers that I've stood up and I get a mini celebration as a reward this is all driven by this automation that we have here so there's two triggers for it the first is that if the desk sensor has been closed for 45 minutes and the second is that the lamp is turned on for 45 minutes and the reason for that is because when I come into the room the desk might already be down uh or when I come into the room the desk might already be up so I want both of those conditions to trigger the automation because I can't just have one or the other so when it's been triggered I'm going to check a few things so I'm going to check if the desk lamp is on which I use to infer that I'm in the office I'm going to check whether the sensor is closed and I'm also going to check whether the office ceiling light is on and the reason for this is because I have this cool automation where if I hold down this button it changes the lighting in the room completely uh the reason I have this is because if I'm on cool it makes the lighting better and when it does this it also turns on the ceiling light uh which means that I can make inferences as to whether I'm on a call based on whether that lights on or not so that's that's what this is is actually checking here so as long as all of those three conditions are met um it's just going to literally call the desk lamp set the color to Blue and it is also going to publish a message to my ulanzi clock um and this is something that I picked up recently it's it's super cool great bit of kit uh smart home junkie has a fantastic video on how to set one of those up so I'll link that down in the description you should definitely go check that out too I've made a whole video about this before um I've got alarmo set up an alarm system and it's driven by a few different contact sensors dotted around the house got one in the garage got one in the front door one in the back door and if any of these sensors get open when the alarm is activated it will trigger the alarm if you're interested in how to set this up I've made a whole video on how to do this uh definitely definitely go check it out so those are my top five automations using contact sensors i' I'd love to hear what you're using contact sers for as well so leave a comment down below and let me know if you enjoyed the video hit like maybe subscribe I'll see you next time
Info
Channel: Smart Home Ideas
Views: 9,462
Rating: undefined out of 5
Keywords:
Id: e4CagqOJvR0
Channel Id: undefined
Length: 9min 10sec (550 seconds)
Published: Sun Jun 16 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.