diff --git a/sense_energy/sense_api.py b/sense_energy/sense_api.py index 901e621..6a766d3 100644 --- a/sense_energy/sense_api.py +++ b/sense_energy/sense_api.py @@ -287,6 +287,7 @@ def trend_start(self, scale: Scale) -> Optional[datetime]: return None def get_stat(self, scale: Scale, key: str) -> float: + key = "consumption" if key == "usage" else key if scale not in self._trend_data or key not in self._trend_data[scale]: return 0 data = self._trend_data[scale][key]