I've never ever done any coding in raw yaml in home assistant before. Until now, i've done ALL automations in the GUI. However, i often see people posting yaml codes with "I just created this smart sensor that can do X" or "i use the X thing to do Y" and i feel very limited when i don't know exactly how to just copy it and make it work. Now i found an example of something i would like, that (as far as i know, with my limited knowledge) cannot be done in the GUI: I would like to have a history of the persistent notifications that are created in Home assistant. I found a community post about it, and it seems a guy did it: https://community.home-assistant.io/t/history-of-notifications/196518 first answer from VDRainer. I tried copying his code into my automation.yaml file in the config folder, but it started throwing a lot of errors that i'm not sure how to resolve.
Any help is very appreciated!
Checking notifications’ history log is useful, to check if you missed some critical notifications. Please make the feature to save notifications history. You could limit no. of notifications or those with “critical status” or unlimited with dependency from the entire HA database recorder history.