NSPanel_HA_Blueprint
NSPanel_HA_Blueprint copied to clipboard
Feature Request: Refactor Notification System
It would be awesome to have a more sophisticated notification system:
- timestamp of notification
- multiple notifications
- home assistant events for confirm/decline (maybe also provide a context value in the service to correlate notification and event)
we will see what else is possible :)
Perhaps options
- whether to make noise or not (quite mode)
- song type
- auto dismiss after a timeout or needed confirmation
Sometimes it would be great to only flash a notification as information only that auto dismiss itself. No need for sound. Other times perhaps an alert that need immediate attention, so make noise and require confirmation.
home assistant events for confirm/decline (maybe also provide a context value in the service to correlate notification and event)
Coud you please elaborate more? You want to trigger an event on HA when a notification is confirmed/declined? or do you want to see as a notification in Home Assistant?
Sometimes it would be great to only flash a notification as information only that auto dismiss itself. No need for sound. Other times perhaps an alert that need immediate attention, so make noise and require confirmation.
You mean like having different levels of notification (info/alert/urgent) and a different behaviour (sound, icon, color, etc) for each level?
The biggest challenge is on the difficulties for storing text by a blueprint or by ESPHome, so will you all be fine if the notifications disappears when ESPHome restarts (just like it is with the current implementation)?
I have another question for you about current implementation of notifications while I'm thinking about this refactoring... There are a few sensors and switches visible on Home Assistant:
- Switch - Confirmation message (not directly related to Notifications, but send a info to decide what show on notification screen)
- Switch - Notification unread
- Sensor - Notification label
- Sensor - Notification text
Is there a need to have those values in Home Assistant for other than managing the behaviour of the blueprint? Or are you using those values outside the blueprint?
As far as notifications go, it might be useful to have a "snooze" button on the popup, which doesn't dismiss the notification icon from the main screen. Maybe it'd snooze the notification for X amount of time until it pops up again?
What about a "to do" replacing notifications?
#1129
I'll give you an exapmle for that one: Imagine a notification that says "Someones at the door, open?" which you then could either accept or decline.
To implement this behavior, I need ...
- a way of distinguishing what exact notification was shown,
- the info, whether the notifcation was accepted or declined.
The cherry on top would be, to have the option to have multiple "active" notifications at once, to also implement things, that do not need "immediate" feedback. Example: "There is new mail in the mailbox." --> when accepted, delete the new mailbox indicator, that also influences e.g. a status light. Example 2: "Window XY has been open for more then Z minutes" --> There are multiple windows so multiple notifications would be good (as a list).
Looking into the todo entity, this could actually be the solution. A single todo entity, which manages the items that than are shown as notifications and also can be shown an interactable list.