#Not a HA user yet. Will HA work for this door sensor automation?

1 messages · Page 1 of 1 (latest)

quasi hawk
#

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.

obtuse crystal
#

Yes that is easy to do

quasi hawk
#

Cool! I will get a HA set up and get working. Thanks

slate kraken
barren rover
#

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.

slate kraken
#

@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 🙂

cold lantern
#

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!
barren rover
barren rover
cold lantern
#

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

slate kraken
#

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"👼

barren rover
cold lantern
#

true, you could use a binary template sensor to mirror the door sensor and strip out unknown/unavailable though

barren rover
#

🤔

#

You know what? I like that idea the best of all.

cold lantern
#

(or just fix your sensors so they don't go unavailable :P)

barren rover
#

HA! When I build my new house all my doors and windows are going to have hardwired sensors. I DARE them to go unavailable.

cold lantern
#

oh that's exciting

#

so much stuff i'd like to do if i was building a house from scratch