I made my “dumb” bell into a smart bell by adding a door sensor next to the magnetic coil. Works perfectly, but with a downside:
When someone rings at the door, depending on length of pressing the button outside, the sensor lists 10+ on/off messages, thus I get 10+ notifications. (I am trying to flash my ceiling lights few times when someone rings.).
How do I get my sensor grouped into one bell? I tried templating, but seems not working or i might have set it up wrong.
What platform are you using for the bell? Zwave, RFXTRX, something else? Please share to let us help you.
And show us your config, because that might be the cause.
It use it everywhere and it works just fine, except that I modified one just for the doorbell and I need it to behave differently than the others. I’ll post the config later.
trigger:
- entity_id: binary_sensor.door_window_sensor_id
platform: state
to: 'off'
action:
- data:
message: 'Somebody is at the door. (Binary)'
service: notify.telegram_info
That gives me for example within 6 notifications within 2 seconds of pressing our doorbell.
Somebody is at the door. (Binary)
Somebody is at the door. (Binary)
Somebody is at the door. (Binary)
Somebody is at the door. (Binary)
Somebody is at the door. (Binary)
Somebody is at the door. (Binary)
Now what I want is to group all these notifications into one notification for the time being and trigger it (or trigger the first one and skip the concurrent ones).
But how/what’s the best way to achieve this? Add a duration after trigger? Or detect when state hasn’t been ‘on’ for a second and trigger afterwards?
My logical mind is at a loss here.
# configuration.yaml
automation:
- alias: Send notification if the door bell rings
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d00015ae7a8
from: 'on'
to: 'off'
condition:
condition: state
entity_id: script.debounce_door_bell
state: 'off'
action:
service_template: script.debounce_door_bell
script:
debounce_door_bell:
sequence:
- service: notify.html5
data:
title: Door bell
message: The door bell rings!
- delay: '00:00:10'
A input_boolean isn’t needed. The script has an “on” (running) and “off” state.