[Newbie] Problem with notifications in history

Hi everyone.
I am now expermenting with persistent_notification.create service and automations and maybe my question is dumb, but I’ve looked through a lot of documentation and i’m truly can’t solve this problem myself.
Problem is :
I’ve created simple automation with mqtt trigger that calls persistent_notification.create service

  alias: test automation
  description: ''
  trigger:
  - payload: 'on'
    platform: mqtt
    topic: home-assistant/controller_STATES/lights/boiler_livolo_1
  condition: []
  action:
  - data:
      message: Boiler lights on
      title: Alarm
    service: persistent_notification.create

i’ve tested this automation and everything was perfect, until i opened the “History” section :

I don’t know, how to remove all of notifications from history. I can’t use persistent_notification.dismiss, cos I didn’t even indicate notification_id in persistent_notification.create

You will have the exclude the persistent_notification domain from the history integration.

thanks for the answer.
Correct me if i wrong: if I do so, any notifications will no longer appear in history in future?
I wanna delete exactly these notifications

recorder:
  exclude:
    domains:
      - persistent_notification

If tomorrow you do this :

image

they will be gone, and no new ones created.

1 Like

Thanks for the answer.
Can you explain me smth about recorder.purge : as i understand, this service deletes all data, that are older than keep_days , all data about all domains and entities, right?
On the picture there is only part of history, exactly the part that bothers me. There are other entities in my history that I don’t want to remove

Can’t be done from HA. Recorder.purge deletes all that is older than ‘keep_days’. You could try with a sqllite3 client, but it is easy to break things that way.

1 Like

Yeah, the last thing i wanna do is to modify database files manually
That’s sad, but, anyway, thank you