I have a single entity that watches a single folder for updates using the HA built in folder sensor.
I've noticed that I need to use parsed_date_sort: true in order to get the correct sorted order. However, I also want to limit the size of the list by using maximum_files: 10.
What I've noticed is that it appears the code is first limiting the list of files to 10 (based on whatever order it receives them) and then performs the parsed_date_sort function. The effect is that I'm not always seeing the most recent videos because the maximum files cuts them off. I've tested this by increasing the maximum files number and the most recent videos appear.
I have a single entity that watches a single folder for updates using the HA built in folder sensor.
I've noticed that I need to use parsed_date_sort: true in order to get the correct sorted order. However, I also want to limit the size of the list by using maximum_files: 10.
What I've noticed is that it appears the code is first limiting the list of files to 10 (based on whatever order it receives them) and then performs the parsed_date_sort function. The effect is that I'm not always seeing the most recent videos because the maximum files cuts them off. I've tested this by increasing the maximum files number and the most recent videos appear.
Here is my full config: