Checking at the alarm panel, I don’t see these ‘ghosted’ reopening so it’s something either introduced by Envisalink itself or the integration.
So this is what I did but it would be so much better if I wasn’t necessary. porte_avant
timer was already defined and used. Shown here for clarity.
This is in configuration.yaml
timer:
porte_avant:
duration: '00:01:00'
porte_avant_debounce_timer:
duration: '00:00:30'
input_boolean:
porte_avant_debounce:
initial: off
In Automation. I have the opening door automation that triggers the debounce code (30 seconds timer) instead of the real code. I did it this way because I have a few automations that kicks in when the door opens (including one that tells the closest Alexa to warn people to wash their hands after coming in ). I’m assuming this timer is reset to 30 seconds each time an event is registered, be it a real door open or a ghost one.
- id: '1585374672119'
alias: Extérieur - Porte avant (trigger)
description: ''
trigger:
- entity_id: binary_sensor.porte_avant
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data: {}
entity_id: input_boolean.porte_avant_debounce
service: input_boolean.turn_on
- data: {}
entity_id: timer.porte_avant_debounce_timer
service: timer.start
This code is the actual automation that uses the boolean instead of the door opening event
- id: '1577893423511'
alias: Extérieur - Ouverture de la porte de l'entrée de l'extérieur la nuit
description: ''
trigger:
- entity_id: input_boolean.porte_avant_debounce
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: light.lumiereentree
state: 'off'
- condition: state
entity_id: binary_sensor.nuit
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.porte_d_entree_motion
state: 'on'
- condition: template
value_template: '{{ (as_timestamp(now()) - as_timestamp(states.binary_sensor.porte_d_entree_motion.last_updated)) < 60 }}'
action:
- entity_id: light.lumiereentree
service: light.turn_on
- entity_id: timer.porte_avant
service: timer.start
This is the timer that clears the debounce boolean after 30 seconds from the last door open event (real or ghost)
- id: '1585373898886'
alias: Timer expiré - Debounce porte avant
description: ''
trigger:
- event_data:
entity_id: timer.porte_avant_debounce_timer
event_type: timer.finished
platform: event
condition: []
action:
- data: {}
entity_id: input_boolean.porte_avant_debounce
service: input_boolean.turn_off
And last, for sake of clarity, this is the timer expired code for the entrance light turning on at night when the door is opened from the outside (ie, movement registered from my Ring doorbell)
- id: '1577896691214'
alias: Extérieur - Ferme la lumière de l'entrée 1 minute après ouverture de la porte
description: ''
trigger:
- event_data:
entity_id: timer.porte_avant
event_type: timer.finished
platform: event
condition: []
action:
- data:
entity_id: light.lumiereentree
service: light.turn_off
Edit: Forgot to add that one. Again it’s just for clarity. If the light is turned off, clear the timer (not the debounce one). So this allow the light to be turned off then back on to let it stay on and not turn off after a minute.
- id: '1578421537058'
alias: Extérieur - Annulation du timer d'ouverture de la porte avant
description: ''
trigger:
- entity_id: light.lumiereentree
platform: state
to: 'off'
condition: []
action:
- entity_id: timer.porte_avant
service: timer.cancel
Feel free to give me advices on improving it. Having just started to work with HA since last December, I’m still quite new at this stuff
Thanks.