You can use this tutorial as an example for many more cases. For instance to show what Smoke Sensor was triggered in your house. What Use Cases can you think of? Let me know!
First of all. You make some fun tutorials to experiment with. I just got this one to work properly after experimenting with it for a couple of days. Thanks for doing these UA-cam videos.
Thank you! I asked this a while ago on the home assistant community but got no response. I had it solved myself by creating a door/window sensor group and get notified which door/window was left open but then you will get redirected to the home assistant app. This one is much better! Thank you, Ed!
Thank you. This is exactly what I'm trying to do. Show use cases in a way so that you can adapt it to your personal needs. Great that it works for you. 👍🏻
Thanks Ed ! Addition : at my house I also do this automation at bedtime... Instead of a door sensor, I even use the illuminance value of the motion sensor in my garage (if the lux value is greater than 1, the door (or garage gate) is still open.
Thanks for this! I currently have any open sensors report when my alarm (using Alarmo) tried to arm, but that only occurs after the exit delay has expired, by which time I'm usually driving down the street. Using this I can create an early warning message when the exit delay starts. 👍
Thanks! Great tutorial on templates. I may have a look and add that to my existing door alarms. My door alarms are always active, but they are depending on the outdoor temperature. The colder it is, the shorter is the time before I get a notification. A cold day I will get a notification after just some minute, but for a worm summer day it will take a few hours. If the door is still not closed, I will receive repeated notifications after a new timeframe depending on the temperature.
I love the automation. I have adapted it to let me know at anytime when a door or window is opened. My grandson 5 yo is visiting, he has found it fun to open and close the door a great number of times in a few seconds. I will get about a dozen alerts telling me the door was opened and closed. What kind of code can I put in for instance to only tell me once every 15 minutes and not every dfew seconds. Thanks
Halo Ed, thanks for this great tutorial. I downloaded the file and installed the template and everything works fine. Can you please help me? I would like an automation with a button that I can press and see this information on the dashboard while I'm at home. Just like with you "Low Battery Warning Sensor Tutorial".
I like your work and how you take the time to explain things. I'm really thinking of getting your code, but I was wondering and I'm not a developer. If I already have a sensor: !include sensors.yaml defined or custom sensor defined in another file, do I have to put all the sensor's in the same location ? OR is it ok to create as you said a "templates.yaml" file for this template ?
Thanks for your videos! -- I'm trying to apply the code but, my door sensor is a Sonoff, I integrate it into the HA by eWelink, and it is recognized as "lock" friendly_name: Door Sensor device_class: lock state: off how can i proceed?
Hi, Ed! Can I add my door locks and door lock sensors in the same code with the window contacts? I am using Homematic IP door locks, door lock sensors and window contact.
I do not own a door lock myself, but you should be able to automatically lock the doors with door locks that can be integrated in Home Assistant. Instead of sending a message, you can then lock the dots automatically if everyone left the house.
Hi, somehow I don't get it to work. it looks like the new entity " number of doors" is not created. I can't find it when I check in states tab under set state. I made a new UUID and loaded the entity using shift+command+P (macOS) to reload template entities. However under developer tools and yaml tab I have no option there to reload the template entities. It does not show.
This way you can see what door is open exactly. You cannot do that with a Helper (without a template). The idea of the tutorial is that you can see what exact device triggers an action without having to check each device separately. This works also great for smoke sensors for example.
Hi Love the way you explain things, I have downloaded your code but have hit a snag. I loading your code in templates.yaml, I have reloaded my templates entities, if I look at developer Tools>Yaml tab, i do not see "template Entities" If I go to developer tools>states I do not find "a number of doors open" sensor I'm sure I have missed a silly step, can you help
I do have quite some videos about that. For instance this one: How To Use Motion Sensors Correctly In Home Assistant ua-cam.com/video/m_fbo_Co-TU/v-deo.html
@@SmartHomeJunkie no problem, I’ll take a look thanks. Try and think about making a new playlist with everything completely basic in it as if someone has just started. Like beginners knowledge base
@@michaelthompson657 Yes, I thought about it multiple times. The thing is that the interface of Home Assistant changes rapidly and videos get outdated because of that. But I might find a way.
@@SmartHomeJunkie yeah I assumed it changes quite quickly but not sure how quickly because I haven’t had it for long. That sounds great, although challenging with all the changes it would still be great
@@SmartHomeJunkie This is for instance my kitchendoor sensor: battery: 100 contact: true device_temperature: 23 last_seen: '2022-11-29T21:12:01.942Z' linkquality: 105 power_outage_count: 230 temperature: 29 voltage: 3005 device_class: door friendly_name: Keukendeur contact Device class is door, so that must be ok.... What else can I check?
@@peterpc Yes, this should be okay. Dus you restart Home Assistant and add the line to the configuration.yaml? You also need to have all your template sensors defined in the templates.yaml and not both in templates.yaml and configuration.yaml or sensors.yaml of you use a templates.yaml. I guess it might be because of this last reason in your case.
@@SmartHomeJunkie I have the 2 sensors in templates.yaml, that is all there is in that file. And in configuration.yaml the template: !include templates.yaml line. My door sensors are added in zigbee2mqtt.
@@peterpc Please make sure that all your template sensors are in the templates.yaml and that you do not have any other template sensors in your configuration.yaml or sensors.yaml.
nice, but how can i make it count my windows aswell? They have another device_class (window) I try'd with adding the extra line | selectattr('attributes.device_class', '==', 'window') but that did not work and changing to this didn't work aswell | selectattr('attributes.device_class', '==', 'window', 'door')
I looked into it more. Use this line in the filter and you will be okay: | selectattr('attributes.device_class', 'in', ['window', 'door']) instead of | selectattr('attributes.device_class', '==', 'door')
@@kicksejaapie The device class door is already in the filter. If your window sensors also have the device class door, they should be taken into account already.
You can use this tutorial as an example for many more cases. For instance to show what Smoke Sensor was triggered in your house. What Use Cases can you think of? Let me know!
First of all. You make some fun tutorials to experiment with. I just got this one to work properly after experimenting with it for a couple of days. Thanks for doing these UA-cam videos.
Thank you!
Thank you! I asked this a while ago on the home assistant community but got no response. I had it solved myself by creating a door/window sensor group and get notified which door/window was left open but then you will get redirected to the home assistant app. This one is much better! Thank you, Ed!
That’s really good teaching !!! Exactly what I need. Don’t have my computer with me at this time but I’m eager to try this…
Thanks a lot.
Thank you for the compliments!
This is just what i need! I've made a simple notification that a door is open but with the notification that sums up the doors is Super!
Great to hear! If you alter the code a little bit, it will also work for your lights, smoke sensors, etc.
very nice and simple process - thank you!!
This is a great learning opportunity that can be leveraged for other needs. Thanks!
Thank you. This is exactly what I'm trying to do. Show use cases in a way so that you can adapt it to your personal needs. Great that it works for you. 👍🏻
Thank you very much for all your tutorials . I use that one like an example for my doors and windows sensors automation. Thank you .
Thanks Ed !
Addition : at my house I also do this automation at bedtime...
Instead of a door sensor, I even use the illuminance value of the motion sensor in my garage (if the lux value is greater than 1, the door (or garage gate) is still open.
Great idea!
Very important to do this sensors, I have something similar but not polished as yours I will replace it with this sensors
Thanks Ed
Great!
Thanks for this! I currently have any open sensors report when my alarm (using Alarmo) tried to arm, but that only occurs after the exit delay has expired, by which time I'm usually driving down the street. Using this I can create an early warning message when the exit delay starts. 👍
I’ve Alarmo and it notify me immediatly and does not arm when I put in away and a door/windows is open. Check your config…
Thanks! Great tutorial on templates. I may have a look and add that to my existing door alarms.
My door alarms are always active, but they are depending on the outdoor temperature. The colder it is, the shorter is the time before I get a notification. A cold day I will get a notification after just some minute, but for a worm summer day it will take a few hours.
If the door is still not closed, I will receive repeated notifications after a new timeframe depending on the temperature.
Clever!
I love the automation. I have adapted it to let me know at anytime when a door or window is opened. My grandson 5 yo is visiting, he has found it fun to open and close the door a great number of times in a few seconds. I will get about a dozen alerts telling me the door was opened and closed. What kind of code can I put in for instance to only tell me once every 15 minutes and not every dfew seconds. Thanks
Thank you :)
Thanks Ed, a great tutorial
Halo Ed, thanks for this great tutorial. I downloaded the file and installed the template and everything works fine.
Can you please help me? I would like an automation with a button that I can press and see this information on the
dashboard while I'm at home. Just like with you "Low Battery Warning Sensor Tutorial".
I like your work and how you take the time to explain things. I'm really thinking of getting your code, but I was wondering and I'm not a developer. If I already have a sensor: !include sensors.yaml defined or custom sensor defined in another file, do I have to put all the sensor's in the same location ? OR is it ok to create as you said a "templates.yaml" file for this template ?
Thank you. You need to create a templates.yaml file indeed.
Another great video👍
Thanks for your videos!
--
I'm trying to apply the code but, my door sensor is a Sonoff, I integrate it into the HA by eWelink, and it is recognized as "lock"
friendly_name: Door Sensor
device_class: lock
state: off
how can i proceed?
Hi, Ed! Can I add my door locks and door lock sensors in the same code with the window contacts? I am using Homematic IP door locks, door lock sensors and window contact.
I do not own a door lock myself, but you should be able to automatically lock the doors with door locks that can be integrated in Home Assistant. Instead of sending a message, you can then lock the dots automatically if everyone left the house.
Hi, somehow I don't get it to work. it looks like the new entity " number of doors" is not created. I can't find it when I check in states tab under set state. I made a new UUID and loaded the entity using shift+command+P (macOS) to reload template entities. However under developer tools and yaml tab I have no option there to reload the template entities. It does not show.
Is there a way to make this in to a script so that Alexa can trigger the automation and then say what windows are open?
What are the benefits of doing it this way instead of creating sensor group helper and check that ?
This way you can see what door is open exactly. You cannot do that with a Helper (without a template). The idea of the tutorial is that you can see what exact device triggers an action without having to check each device separately. This works also great for smoke sensors for example.
Hi
Love the way you explain things, I have downloaded your code but have hit a snag.
I loading your code in templates.yaml,
I have reloaded my templates entities, if I look at developer Tools>Yaml tab, i do not see "template Entities"
If I go to developer tools>states I do not find "a number of doors open" sensor
I'm sure I have missed a silly step, can you help
Hehe all sorted, amazing what a reboot can solve :)
Did you add a line to your configuration.yaml that points to your templates.yaml? (And did you reboot HA after that?)
@@SmartHomeJunkie I had forgot to reboot, thanks for the advice. all working now
@@philhill2998 Great to hear!
Im very new to HA, would you consider doing some extremely basic videos please? That’s with very little yaml and nearly everything in the UI
I do have quite some videos about that. For instance this one:
How To Use Motion Sensors Correctly In Home Assistant
ua-cam.com/video/m_fbo_Co-TU/v-deo.html
@@SmartHomeJunkie no problem, I’ll take a look thanks. Try and think about making a new playlist with everything completely basic in it as if someone has just started. Like beginners knowledge base
@@michaelthompson657 Yes, I thought about it multiple times. The thing is that the interface of Home Assistant changes rapidly and videos get outdated because of that. But I might find a way.
@@SmartHomeJunkie yeah I assumed it changes quite quickly but not sure how quickly because I haven’t had it for long. That sounds great, although challenging with all the changes it would still be great
Is there a way to combine these sensors. so if I click on more info from the entity count, it shows the list?
Not sure if I understand you correctly, but you can group sensors using a helper.
Downloaded and installed the template, but both states say unavailable. How can I check what is wrong? I have multiple door sensors.
You might have to alter the code so that it fits the attribute values of your door sensors.
@@SmartHomeJunkie This is for instance my kitchendoor sensor:
battery: 100
contact: true
device_temperature: 23
last_seen: '2022-11-29T21:12:01.942Z'
linkquality: 105
power_outage_count: 230
temperature: 29
voltage: 3005
device_class: door
friendly_name: Keukendeur contact
Device class is door, so that must be ok....
What else can I check?
@@peterpc Yes, this should be okay. Dus you restart Home Assistant and add the line to the configuration.yaml? You also need to have all your template sensors defined in the templates.yaml and not both in templates.yaml and configuration.yaml or sensors.yaml of you use a templates.yaml. I guess it might be because of this last reason in your case.
@@SmartHomeJunkie I have the 2 sensors in templates.yaml, that is all there is in that file. And in configuration.yaml the template: !include templates.yaml line.
My door sensors are added in zigbee2mqtt.
@@peterpc Please make sure that all your template sensors are in the templates.yaml and that you do not have any other template sensors in your configuration.yaml or sensors.yaml.
nice, but how can i make it count my windows aswell?
They have another device_class (window)
I try'd with adding the extra line
| selectattr('attributes.device_class', '==', 'window')
but that did not work
and changing to this didn't work aswell
| selectattr('attributes.device_class', '==', 'window', 'door')
Yes, you have to create two lists and concatenate the two lists to get that to work.
I looked into it more. Use this line in the filter and you will be okay:
| selectattr('attributes.device_class', 'in', ['window', 'door'])
instead of
| selectattr('attributes.device_class', '==', 'door')
Hi Ed, is it possible to combine window/door sensors with this?
Yes, no problem!
@@SmartHomeJunkie do i need seperate template sensors? Or can i just add a selectattr device_class door to the existing template code?
@@kicksejaapie The device class door is already in the filter. If your window sensors also have the device class door, they should be taken into account already.
@@SmartHomeJunkie device_class window i mean, sorry for that.
@@kicksejaapie You cannot add that device class in a simple way, but you have to create two lists and combine them.
When I look at the attributes for my device tracker (Samsung phone) the source type is set to GPS, how can I change that to modem? Thanks.
If your router integration supports tracking, look at the router entities to use that as a tracker instead of your phone.
@@SmartHomeJunkie Thanks. Sadly it looks like router not supported, will have to keep using geo location.
👍
Is the download code file gone? I don't see a link anywhere on the page.
The link is in the description.