diff --git a/apps/predbat/predheat.py b/apps/predbat/predheat.py index 190a5f89..c43c912b 100644 --- a/apps/predbat/predheat.py +++ b/apps/predbat/predheat.py @@ -85,6 +85,10 @@ def fill_table_gaps(self, table): last_key = min_key last_value = table[min_key] new_table = {} + + if not table: + return table + for key in range(min_key, max_key + 1): if key not in table: next_value = last_value