Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105861

Restrict automation trigger for mailbox?

$
0
0

Hi everybody,

I have an ESPHome in my front yard that is connected to my mailbox slot. The mailbox itself is mounted to the fence so that the mail person does not have to enter the property, so we usually don’t notice when mail has actually been delivered (outside US, so there is no cool flag on our mailbox to indicate whether or not something has been inserted).

The sensor is usually set to ON and only changes to OFF when the mailbox slot opens (via contact sensor). This used to work very well! Unfortunately, recently things started looking like this

grafik

We got around 500 Telegram notifications last night that mail had been delivered.

As you can see in the image, the ESPHome occasionally turns to unavailable. I believe this is due to current weather conditions (-5°C), as this did never happen in the past summer or fall. This used to cause even more false triggers, so I changed my automation.

However, the false triggers after 23:00 were actual triggers, not due to the device being unavailable (at least it looks like this to me).

Is there a way I can change my current automation without creating additional helpers so that only one notification will be sent in a certain time period? Let’s say when the sensor turns from ON to OFF, send one notification - then block all other notifications for 30 minutes (or so), regardless how many times the sensor status changes. After those 30 minutes have passed, send another notification when the sensor status changes.

Thank you in advance for your ideas :slight_smile:

automation:
  - alias: "[NOT] Briefkasten"
    trigger:
      - platform: state
        entity_id: binary_sensor.briefkasten
        from: "on"
        to: "off"
    action:
      - service: notify.wir_alle
        data:
          title: "📤"
          message: "Bitte Briefkasten leeren :)"

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 105861

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>