Petro31 / easy-time-jinja

Easy Time calculations for Home Assistant templates
MIT License
68 stars 25 forks source link

big_time_between showing 1 decimal place for hour field #25

Closed WhimsySpoon closed 9 months ago

WhimsySpoon commented 9 months ago

Since installing v2, the hour part of big_time_between is rounded, but given a .0 decimal place.

For example, the following returns 1.0 hour and 59 minutes:

{% from 'easy_time.jinja' import big_time_between %}
{{ big_time_between(now(), now() + timedelta( hours = 1, minutes = 59 )) }}
Petro31 commented 9 months ago

Rounding does not happen in big time. Rounding only occurs in easy time or if you have a single value being returned, like hours or minutes. Not hours and minutes.

Petro31 commented 9 months ago

Fixed in 2.0.0.1