mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-26 10:17:18 +00:00
[FIX] Chargings duration bad conversion + dash type
This commit is contained in:
committed by
Florian BEZANNIER
parent
dfa4e8fb8d
commit
e63dfd3ef5
@@ -104,7 +104,7 @@ class Charging:
|
|||||||
if c.get("stop_at") and c.get("start_at"):
|
if c.get("stop_at") and c.get("start_at"):
|
||||||
c.update(
|
c.update(
|
||||||
{
|
{
|
||||||
"duration_min": (c.get("stop_at") - c.get("start_at")).seconds
|
"duration_min": (c.get("stop_at") - c.get("start_at")).total_seconds()
|
||||||
/ 60,
|
/ 60,
|
||||||
"duration_str": str((c.get("stop_at") - c.get("start_at"))),
|
"duration_str": str((c.get("stop_at") - c.get("start_at"))),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user