-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delayed device notification option #1
Comments
Thanks for this. I will take a look and try it out. :) |
Ok, these changes would be for people that only want ONLINE / OFFLINE notifications and not whether a device hasn't created an event in x hours. I can see that being useful. When this app was originally created, ONLINE / OFFLINE didn't exist so event evaluation was the only method to determine if a device was "offline". I'll add this option in. Thanks for the contribution. |
Added an option to disable "Device Delayed" notifications. Thanks again. |
No problem. In my testing it still sends messages for devices not sending events, so I was assuming/hoping that the delayed devices were ones that just weren't being checked due to the time settings. |
Gotcha, I actually just added another option to disable "Not Reporting Events" notifications. I haven't tested it, but it is using the same method that you posted for the other notifications. So it should work. |
@erocm123
I found the constant delayed devices notifications extremely irritating, so I think I added an option to choose to receive them or not. I really just want to know if the batteries are low, if a device came back online, and if one went online.
I'm not familiar with this language, so I read the code and guessed at what would make that work. Please take a look at the sections I changed and let me know if I've got it right.
I copied and altered the deviceOnline setting option and the test to send notifications.
Also still not fully familiar with github (it seriously confuses me), so I'm sorry about the clunkiness of this.
First change:
input "deviceOnline", "bool", title: "Send a notification if a device comes back online?", required: false, submitOnChange: false, value: false
// Added option for delayed notifications
input "deviceDelayed", "bool", title: "Send a notification listing devices that have had checks delayed?", required: false, submitOnChange: false, value: false
Second change:
// Check if delay notifications wanted
// Original 'if (delaylistCheckMapDiff)'
if (deviceDelayed != null && deviceDelayed.toBoolean() == true && (delaylistCheckMapDiff)) {
The text was updated successfully, but these errors were encountered: