Questions about notifications

hi.
i’m using notifications to let me know when my dehumidifier shuts down (stops drawing power) when the water tank is full. the thing is that i have to go in and dismiss the notification manually. is it possible to dismiss the notification automatically when i empty the water tank and the dehumidifier goes back to normal?

also, is it possible to send notifications via SMS?

What type of notification are you using… there are about 60 core integrations that do notifications.

Most users use the Home Assistant Companion app for mobile notifications.

here’s the code from one automation:

metadata: {}
data:
  message: The dehumidifier just shut down. Is the water tank full?
action: notify.persistent_notification

is there any type of notification that can do what i want?

i usually turn off tailscale and the companion app because they drain the battery so fast. also, can the companion app play a sound when a notification comes in?

Yes, the Persistent Notification integration has an action persistent_notification.dismiss for that purpose, but you will need to modify your original action so that the notification’s ID is known…

  - action: notify.persistent_notification
    metadata: {}
    data:
      message: The dehumidifier just shut down. Is the water tank full?
      data:
        notification_id: dehumidifier_shut_down

Then you would use the following to dismiss it:

  - action: persistent_notification.dismiss
    data:
      notification_id: dehumidifier_shut_down

This could be either in its own automation or you could add a Wait for trigger in your existing automation.


hi.
i tried that notification_id stuff, and it gave me an error:

Error: extra keys not allowed @ data['notification_id']

Sorry about that. I missed the second level data attribute. I will correct it above.

no need. i found out how to make it work. thanks anyway :slight_smile: