What component are you using to read that feed? I may set that up so I have a sensor which matches your configuration so I can test any changes I make.
I have tried to create a ‘last motion’ feed with my motion sensors and the below code however it doesn’t seem to be updating correctly. For example I can look in the dev-states and see that the kitchen motion sensor was triggered 6 hours ago, yet it isn’t in the home feed card… any ideas? (there are a number of motion sensors that should all be showing activity around 6 hours ago, but there is nothing showing for that time period)
I’ve just deployed a new Beta release (0.3.4b1). You will need to use the “Show beta” option in the settings for this card in HACS to see this. This should fix your issue by sorting the items from entities in descending order of their timestamps before applying max_items.
I did notice that, to get timestamps from feedparser which parsed correctly in my card, I had to set the date_format option in feedparse to ‘%Y-%m-%d’ like this:
The option exclude_duplicates is wrong. It should be remove_repeats. The default value for this option is true so, since you are excluding the off state with the exclude_states option (which is applied before the remove_repeats option), all but the earliest occurrence of motion for a sensor over the last 24 hours are being excluded.
oooooo YES!
Thanks so much. It works as well as I expected !!
the image (which I will try to remove) is distorted, will it be the caches of my browser? … anyway … thank you very much!
There was an issue in 0.3.4b1 due to a a fix I had added to stop images being cut off in the feed. This was setting the width to 100% but unfortunately this also caused images smaller than the width of the feed being stretched. I have just released 0.3.4b2, which now set the maximum width rather than the width, which should work for both cases.
Did you just remove the exclude_duplicates: false or did you replace it with remove_repeats: false? Each entity would need to look like this (using the first one as an example) if you want all the events to appear:
I followed your instructions but i today i get this:
Why the news is about 11 november? And the ANSA news are not listed?
Is the link clickable or i have only the number of news?
I checked the sensor and about hassio help it says 0, while wikiquote shows me only the first of 10 and it’s the oldest article…
Are you using the Beta version? That fixes an issue with multi-value entities, where max_items would pick the earliest rather than the latest items from the entity.