This pull request fixes a bug which would incorrectly display travel time as "1 minute" in case the actual travel time as reported by the sensor was >= 1 hour.
Before:
After:
Background, Context
Travel time sensor for Google API will report travel time duration in the following format in case the travel time is >= 1 hour: X hour YZ mins.
Here is an example:
The card code didn't correctly handle this scenario so it parsed "X YZ" string to integer which returns 1.
This pull request fixes a bug which would incorrectly display travel time as "1 minute" in case the actual travel time as reported by the sensor was >= 1 hour.
Before:
After:
Background, Context
Travel time sensor for Google API will report travel time duration in the following format in case the travel time is >= 1 hour:
X hour YZ mins
.Here is an example:
The card code didn't correctly handle this scenario so it parsed "X YZ" string to integer which returns 1.
This pull request fixes that.