Timing an email alert?

Hi all,
I’m fairly new to app writing and with the help of other have been able to write a successful app, now I’d like to add additional functionality. The issue I’m having is an optical sensor is connected to our gateway for measuring the level of dust inside a collection barrel. As dust comes into the barrel and reaches the level to trip the sensor there is a time of operation in-between full and not full that will bounce the sensor activation on and off. We would like to have our app. send an email when the dust reaches the sensor but the bounce has made this problematic. I received 120 emails in the course of five minutes of operation.

Here is the ask: The sensor stays active all the time for monitoring, but is there a way to setup the app to look at the sensor at say 6am in the morning if it is full at that time (or later would be nice because I sleep in sometimes) send the email then?

hello @josha, welcome!! thanks for posting your question!!

you could add a Conditional statement in your Trigger that checks for the hour of the Day, and only send an email if it’s at 6AM (or any other time you’d like): format_date_tz(@App Info.Current Date and Time , 'HH', 'EST'). for example:

however, the App does need to be running on the device. did I correctly understand your question?? let me know!!

@gio YES! I will give this a try, Thank you. We had a feeling there maybe a solution along these lines just new to all this.

great to hear @josha!! let us know if you have any further questions as you’re building this out.