diff --git a/custom_components/peaqev/manifest.json b/custom_components/peaqev/manifest.json index f9c21d41..2234ef33 100644 --- a/custom_components/peaqev/manifest.json +++ b/custom_components/peaqev/manifest.json @@ -25,5 +25,5 @@ "requirements": [ "peaqevcore==19.0.1" ], - "version": "3.0.1" + "version": "3.0.2" } diff --git a/custom_components/peaqev/peaqservice/hub/nordpool/nordpool.py b/custom_components/peaqev/peaqservice/hub/nordpool/nordpool.py index c26c0c9e..e7aeec68 100644 --- a/custom_components/peaqev/peaqservice/hub/nordpool/nordpool.py +++ b/custom_components/peaqev/peaqservice/hub/nordpool/nordpool.py @@ -202,17 +202,12 @@ async def async_add_average_data(self, new_val): rounded = round(new_val, 3) if datetime.now().date not in self.model.average_data.keys(): self.model.average_data[datetime.now().date] = rounded - # if len(self.model.average_data) == 0: - # self.model.average_data.append(rounded) - # elif self.model.average_data[-1] != rounded: - # self.model.average_data.append(rounded) await self.async_cap_average_data_length() async def async_cap_average_data_length(self): while len(self.model.average_data) > AVERAGE_MAX_LEN: min_key = min(self.model.average_data.keys()) del self.model.average_data[min_key] - #del self.model.average_data[0] async def async_get_average(self, days: int) -> float: try: diff --git a/custom_components/peaqev/sensors/money_sensor.py b/custom_components/peaqev/sensors/money_sensor.py index 2c5e78c4..1e829f05 100644 --- a/custom_components/peaqev/sensors/money_sensor.py +++ b/custom_components/peaqev/sensors/money_sensor.py @@ -116,9 +116,6 @@ async def async_added_to_hass(self): await self.hub.nordpool.async_import_average_data( state.attributes.get("Nordpool average data", 50) ) - # self._average_nordpool_data = list( - # state.attributes.get("Nordpool average data", 50) - # ) self._average_nordpool_data = self.hub.nordpool.average_data self._average_nordpool = ( f"{self.hub.nordpool.average_weekly} {self._currency}"