I'm looking at getting a door sensor that can be used as a dead man's switch. So unlike most users I want to automate a SMS alert if a door is NOT opened during 4 separate one hour time frames each day. I only want an alert is no one opens the door. This is to know if someone is no call/no showing for letting a dog out.
Would HA and a door sensor work with this? Perhaps with Twilio or something else.
Thank you and I hope this is the right place to ask this question.
#Not a HA user yet. Will HA work for this door sensor automation?
1 messages · Page 1 of 1 (latest)
Yes that is easy to do
Cool! I will get a HA set up and get working. Thanks
There are unlimited ways how you could do this. I think I would do something with a helper (input_boolean) to remember the door is opened.
https://pastebin.com/MpkQFcML
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Yeah, i'm imagining an input_boolean helper that is forced off at the start of the hour.
If the door opens it is pushed to on.
Then at the end of the hour the automation checks the state of the helper and reports if necessary.
@barren rover I forced it off at the end of the hour (after checking if a notification needs to be send) as it saves a trigger. But yeah, it's what I've shown indeed 🙂
You could do it without that
description: ""
alias: Notify when door not opened in time frames
mode: single
triggers:
- trigger: time
at: "09:00:00"
id: Time's up
- trigger: time
at: "12:00:00"
id: Time's up
- trigger: time
at: "15:00:00"
id: Time's up
- trigger: time
at: "18:00:00"
id: Time's up
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.door_contact
state:
- "off"
for:
hours: 1
minutes: 0
seconds: 0
sequence:
- action: notify.mobile_app
metadata: {}
data:
message: Door not opened!
Sorry, I was just emptying my brain. I didn't actually look at yours first. Either works.
The only problem I can see with that is that you may get false negatives if the sensor goes unavailable during the hour. Though in a perfect world it would be fine.
wait, no should be on the door sensor, not the input_boolean
yeah
but you'll get false positives if the sensor is dropping out and missing the door opening
garbage in, garbage out
Ah, yeah, You could do it without even! You can just check if the door itself was closed for more then an hour 😅 Indeed only unavailable would cause trouble but a sensor going unavailable is giving trouble anyway :p
So glad I stated "There are unlimited ways"👼
If the door sensor goes unavailable, you lose only that short time period of triggers on the input_boolean. If you have it timed for the hour, you lose the whole hour.
true, you could use a binary template sensor to mirror the door sensor and strip out unknown/unavailable though
(or just fix your sensors so they don't go unavailable :P)
HA! When I build my new house all my doors and windows are going to have hardwired sensors. I DARE them to go unavailable.