diff --git a/dsmr_stats/services.py b/dsmr_stats/services.py index 95af4e6b..9e6ad5d5 100644 --- a/dsmr_stats/services.py +++ b/dsmr_stats/services.py @@ -260,7 +260,10 @@ def clear_statistics() -> None: def electricity_tariff_percentage(start: date, end: date) -> Optional[Dict]: """Returns the total electricity consumption percentage by tariff (high/low tariff).""" - totals = DayStatistics.objects.filter(day__gte=start, day__lte=end,).aggregate( + totals = DayStatistics.objects.filter( + day__gte=start, + day__lte=end, + ).aggregate( electricity1=Sum("electricity1"), electricity2=Sum("electricity2"), )