From f5eab413c207319c0be12fc5e0fe9e555ee02461 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 8 Jul 2024 14:13:59 +0100 Subject: [PATCH] capture energy_consumption_estimates --- backend/Property.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/Property.py b/backend/Property.py index 5a9d3fe8..c54405b2 100644 --- a/backend/Property.py +++ b/backend/Property.py @@ -113,6 +113,7 @@ class Property: self.floor_type = None self.energy_cost_estimates = {} + self.energy_consumption_estimates = {} self.energy = { "primary_energy_consumption": epc_record.get("energy_consumption_current"), @@ -618,7 +619,6 @@ class Property: lighting_cost = float(self.data["lighting-cost-current"]) heating_cost = float(self.data["heating-cost-current"]) hot_water_cost = float(self.data["hot-water-cost-current"]) - total_cost = lighting_cost + heating_cost + hot_water_cost adjusted_heating_cost = AnnualBillSavings.adjust_energy_cost_to_metered( epc_energy_cost=heating_cost, @@ -668,6 +668,13 @@ class Property: "appliances": appliances_energy_cost } + self.energy_consumption_estimates = { + "heating": heating_prediction, + "hot_water": hot_water_prediction, + "lighting": lighting_kwh, + "appliances": appliances_energy_use + } + self.expected_energy_bill = ( adjusted_heating_cost + adjusted_hot_water_cost + adjusted_lighting_cost + appliances_energy_cost )