yyrkoon94 / lovelace-idf-mobilite

Lovelace Card for IDF Mobilité (Bus, Métro, RER)
24 stars 6 forks source link

Feature/sort messages by the shortest validity date #13

Closed wgrs33 closed 11 months ago

wgrs33 commented 11 months ago

Hi! This is something that I came across this weekend when using your card.

  1. I was going out and I checked the train. I needed to wait a bit to read the part of the message which was important. What I noticed is that mostly the most important message will have the shortest validity date. Now the messages are sorted by the shortest validity date.
  2. I added a condition which will concatenate only a message which is still valid - I don't know if PRIM servers can hold any message which has been expired but it might be useful to check it anyway.
  3. When the text message is too long, its animation speed is too fast to read anything. Now the speed animation is based on the text length with the condition that the minimum value is set to 5.

PS. I have more ideas to add after few days of practical tests. I hope that you don't mind if I push more PRs...

yyrkoon94 commented 11 months ago

Hello @wgrs33,

Thanks for this new PR. It's much appreciated to have help improving this Card ! It is the main objective of open source to have contributors committed to improving the solution. So don't hesitate if you have ideas, it serves the community!

I will publish the new release by the end of the day ;)