Skip to content

Commit 0ddbf03

Browse files
Merge pull request #222 from tomasz-soltysik/patch-1
Fix condition for "not a value"
2 parents a4bea2e + ded3d2a commit 0ddbf03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/tauron_amiplus/connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def get_raw_values_daily_for_day(self, day, generation):
337337
}
338338
self.log(f"Downloading daily data for day: {day_str}, generation: {generation}")
339339
values = self.get_chart_values(payload)
340-
if values is not None and not any(a is None and a != 0 for a in values['data']['values']):
340+
if values is not None and not any(a is None or a == 0 for a in values['data']['values']):
341341
self.add_all_data(values, day)
342342
self._cache.add_value(day, generation, values)
343343
self.log(f"Downloaded daily data for day: {day_str}, generation: {generation}")

0 commit comments

Comments
 (0)