Hi
I’m having trouble defining an automation which checks if a door sensor is open or not.
The issue is that the sensor becomes unavailable, so when the door opens, it becomes unavailable after a while until close or visa versa.
Is there a way I can make the automation smart enough to ignore the unavailable and continue check if the door is opens longer than 30 minutes?
So this automation doesn’t work because of the unavailable states sometimes, like you can see in the logs:
alias: Doors
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.aqara_contact
to: "on"
for:
hours: 0
minutes: 30
seconds: 0
condition: []
action:
- service: notify.family
data:
message: "The door is open for a hour!"
title: Door
mode: single
the log: