github dannymcc/may v0.40.0

3 hours ago

0.40.0

Changed

  • Hour-metered vehicles are now described in hours everywhere. #282 labelled
    a vehicle's own page, its charts, maintenance list, calendar feed and PDF
    report in engine hours. This finishes the job on the surfaces it missed.

    The trip and charging forms asked for an odometer reading sized in the
    account's distance unit; they now ask for engine hours, rendered server-side
    so the label is right before any script runs. The fuel, expense, note, tyre
    and allowance forms already took the unit from the vehicle but still called
    the field "Odometer" — on a machine with no odometer to read — so the word
    now follows the vehicle as well as the unit beside it.

    The CSV exports stamped every row with the vehicle's distance unit, filing a
    tractor's engine hours under a distance heading alongside the cars; each row
    now states the unit its own vehicle meters in.

    Totals that span both kinds of vehicle — the dashboard and the trip
    summaries — added engine hours to miles and called the result a distance.
    They now say "mixed units" rather than claiming a unit that describes
    neither half of the sum.

    Distance-metered vehicles are unchanged throughout.
    (#324)

Note for Home Assistant users

The Home Assistant endpoints described an hour-metered vehicle's reading as
miles. They now report the unit the reading is actually in: unit_distance
on /api/ha/vehicles, and distance_unit on the per-vehicle stats endpoint,
return h for such a vehicle instead of the account's distance preference.

If you have a sensor templated on either field for an hour-metered vehicle,
its reported unit will change on upgrade. Sensors for distance-metered
vehicles are unaffected. This is now documented in the README.

Other

  • The tracking unit is still neither exposed nor settable over the REST API;
    vehicles created there are tracked by distance. The README says so
    explicitly now.

Don't miss a new may release

NewReleases is sending notifications on new releases.