From 1ec2bea0dbf6a66aca80d6f1ff205ee429419a0a Mon Sep 17 00:00:00 2001 From: Trefor Southwell <48591903+springfall2008@users.noreply.github.com> Date: Sat, 14 Dec 2024 21:03:13 +0000 Subject: [PATCH] Predheat typo for gas mode --- apps/predbat/predheat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/predbat/predheat.py b/apps/predbat/predheat.py index 0f5b6003..53289f1d 100644 --- a/apps/predbat/predheat.py +++ b/apps/predbat/predheat.py @@ -88,7 +88,7 @@ def fill_table_gaps(self, table): for key in range(min_key, max_key + 1): if key not in table: next_value = last_value - for next_key in range(key + 1, max_key + 1): + for next_key in range (key + 1, max_key + 1): if next_key in table: next_value = table[next_key] break @@ -363,12 +363,13 @@ def run_simulation(self, volume_temp, heating_active, save="best", last_predict_ # self.log("Minute {} flow {} volume {} diff {} power {} kw".format(minute, flow_temp, volume_temp, flow_temp_diff, heat_power_in / 1000.0)) + if self.mode == "gas": # Gas boiler flow temperature adjustment in efficiency based on flow temp inlet_temp = int(volume_temp + 0.5) inlet_temp = min(max(inlet_temp, 0), 100) condensing = self.gas_efficiency.get(inlet_temp, 0.80) - heat_power_in /= condensing + heat_power_in = heat_power_out / (condensing * self.heat_cop) else: # Heat pump efficiency based on outdoor temp out_temp = int(external_temp + 0.5)