qistoph / MMM-MyCommute

This a module for the MagicMirror. It shows your commute time using Google's Traffic API
39 stars 14 forks source link

Feature: Mutiple values for start time, end time #19

Open irsx02 opened 4 years ago

irsx02 commented 4 years ago

Feature request:

I am "wait to the last minute" person. Which means for traffic reports, I like to have the most up-to-date time to arrive to my school/work/etc exactly on time.

" A wizard is never late, nor is he early, he arrives precisely when he means to."

I also do not want to exhaust my limited google maps requests. Which means I would like two (or more) start time/end times. Basically, during rush hour (or school hours) is when I want up to the minute refreshes.

Is there a way to change the startTime/endTime parameter to have multiple start time, end times. For example, startTime: '06:00', '17:00' endTime: '07:59', '18:00' which means that the mirror updates at 6am - 7:59a, and again at 17:00-18:00.

Of course, this is a nice to have feature. Can you put the start times into an array?

Thanks

radokristof commented 4 years ago

I have added this feature to my fork. I hope that one day I can merge these into this project. Until then, you can use it from here:

https://github.com/radokristof/MMM-MyCommute

But please check the README some things changed in my fork, for example there is no global startTime, endTime. You have to specify your start and end times for each destination. However you can use Arrays now and add multiple start and end times.