-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Allow duplicate notification update if specified field changes #2098
Comments
Sensors are all based on a state, for this sensor the state is set to the Text of the notification. All other aspects of the notification are attributes so we evaluate if the state has changed or not. Attributes should not trigger a state change as attributes describe a notification which is whats happening here and the reason as to why many of the sensors were broken down because they had a separate state. This isnt a limitation just for this sensor but we apply it to all sensors, if we remove this then every single time a sensor update check is performed then all sensors will do a check for an update and you will get more updates than needed. In this case its recommended to use another app to post a notification when this one is received or ask the developer if they can provide a broadcast intent for this action so you can have those events forwarded to HA and make a sensor out of it. Changing the logic here doesn't make sense either to check the Title because most apps provide an update to the Text of the notification which is considered a required field on Android and also our app. |
Thanks, that makes sense. |
Basically your allow list would consist of tasker and the libre one and in Tasker you would make it post a notification sometime after libre posts one. This way the state of the Last Notification sensor changes to Tasker so it can change back to whatever Libre wanted to send. |
Ahhh of course. Ok that makes sense, thanks. I assume the HA app is excluded by default, so I couldn't use that? I usually send an actionable notification to the HA app when I receive this one |
correct we exclude our own package otherwise itll pick up the sensor worker notifications and will be stuck in a loop 🙃 |
Is your feature request related to a problem? Please describe.
We use the last notification sensor as a way to trigger automations depending on alarms from my wife's glucose sensor app.
The app only sends a handleful of notification types, most commonly High Glucose and Low Glucose. Due to the way the app sends these notifications, the
android.text
field does not change, but the title field does.This is a problem because it is common for a low Glucose notification to be triggered, and then the next notification from the app could also be a Low Glucose notification, a few hours or so later
Describe the solution you'd like
A toggle that allows for duplicate notification sending, should a specific field be updated, the sensor updates. As it works right, the sensor only updates if the android.text field changes
Alternatively, logic should look to see if the title or text has changed, if so, update the sensor
Describe alternatives you've considered, if any
None
Additional context
The app in question: https://play.google.com/store/apps/details?id=com.freestylelibre.app.gb
I'm sure there will also be other use cases.
Notification example for High Alarm
Notification example for Low alarm
The text was updated successfully, but these errors were encountered: