home-assistant / alerts.home-assistant.io

Home Assistant Alerts

Home Page:https://alerts.home-assistant.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change date fields in feed when a post is updated

mdegat01 opened this issue · comments

I created a blueprint to notify people when there's a new alert posted to the alerts.home-assistant.io feed. But I noticed I never got the alert for Security Disclosure 2.

I dug in and realized its because the first Security Disclosure post was updated instead of a new one being posted. Also even though the post was updated the updated fields weren't changed. There's two fields that are now inaccurate, the feed itself has an updated field and the Security Disclosure 2 entry also has an updated field which are both wrong. They both say 2021-01-14T12:00:00.000Z even though the feed was updated today with a new Security Disclosure.

Can I request that in the future you avoid updating posts and instead post new ones to make it easier for feedreaders like HA's feedreader integration to follow? You can replace alerts if you want just give the update a new publish date so readers can recognize the update. Or at the very least please change the updated fields on an update so watchers can pick that up.

I think having both created and updated fields would cover all bases.

Edit: Upon a closer look at the actual feed, these fields already exist. The updated field just wasn't changed.
image

updated can be added to the md files, that will be used in the feed if present, with a fallback to the created.

<updated>{% if alert.data.updated %}{{ alert.data.updated | dateToRfc3339 }}{% else %}{{ alert.data.created | dateToRfc3339 }}{% endif %}</updated>