diff --git a/mytoyota/models/trips.py b/mytoyota/models/trips.py index 6cce8ed0..b8e7fcff 100644 --- a/mytoyota/models/trips.py +++ b/mytoyota/models/trips.py @@ -166,6 +166,20 @@ def average_fuel_consumed(self) -> float: return 0.0 + @property + def score(self) -> float: + """The (hybrid) score for the trip. + + Returns + ------- + float: The hybrid score for the trip + + """ + if self._trip.scores and self._trip.scores.global_: + return self._trip.scores.global_ + + return 0.0 + @property def route(self) -> Optional[List[Tuple[float, float]]]: """The route taken.