NSPanel_HA_Blueprint icon indicating copy to clipboard operation
NSPanel_HA_Blueprint copied to clipboard

Feature Request: Refactor Notification System

Open zimjjan opened this issue 1 year ago • 10 comments

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)

zimjjan avatar Mar 19 '23 15:03 zimjjan

we will see what else is possible :)

Blackymas avatar Mar 19 '23 20:03 Blackymas

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.

Floppe avatar Mar 21 '23 06:03 Floppe

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?

edwardtfn avatar Aug 25 '23 15:08 edwardtfn

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?

edwardtfn avatar Aug 25 '23 15:08 edwardtfn

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)?

edwardtfn avatar Aug 25 '23 15:08 edwardtfn

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:

  1. Switch - Confirmation message (not directly related to Notifications, but send a info to decide what show on notification screen)
  2. Switch - Notification unread
  3. Sensor - Notification label
  4. 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?

edwardtfn avatar Sep 06 '23 12:09 edwardtfn

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?

CDuy avatar Sep 30 '23 18:09 CDuy

What about a "to do" replacing notifications?

#1129

edwardtfn avatar Oct 26 '23 04:10 edwardtfn

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).

zimjjan avatar Nov 26 '23 08:11 zimjjan

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.

zimjjan avatar Dec 04 '23 08:12 zimjjan