From 9c362b363986c91e07527266fb6f95b46063d55f Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Mon, 20 Apr 2026 13:17:37 +0000 Subject: [PATCH] =?UTF-8?q?Popualte=20shower=20outlets=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datatypes/epc/domain/mapper.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index d8262869..c8affa18 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -61,6 +61,7 @@ from datatypes.epc.surveys.pashub_rdsap_site_notes import ( PasHubRdSapSiteNotes, RoofSpaceDetail, Ventilation, + WaterUse, Window, ) @@ -123,7 +124,7 @@ class EpcPropertyDataMapper: floors=[], main_heating=[], door_count=room_counts.number_of_external_doors, - sap_heating=_map_sap_heating(heating, ventilation), + sap_heating=_map_sap_heating(heating, ventilation, survey.water_use), sap_windows=[_map_sap_window(w) for w in survey.windows], sap_energy_source=SapEnergySource( mains_gas=general.mains_gas_available, @@ -1497,7 +1498,7 @@ def _map_sap_window(window: Window) -> SapWindow: def _map_sap_heating( - heating: HeatingAndHotWater, ventilation: Ventilation + heating: HeatingAndHotWater, ventilation: Ventilation, water_use: WaterUse ) -> SapHeating: main = heating.main_heating secondary = heating.secondary_heating @@ -1509,6 +1510,16 @@ def _map_sap_heating( None if secondary.secondary_fuel == "No Secondary Heating" else None ) + shower_outlets = ( + ShowerOutlets( + shower_outlet=ShowerOutlet( + shower_outlet_type=water_use.showers[0].outlet_type, + ) + ) + if water_use.showers + else None + ) + return SapHeating( instantaneous_wwhrs=InstantaneousWwhrs(), main_heating_details=[ @@ -1523,4 +1534,5 @@ def _map_sap_heating( ], has_fixed_air_conditioning=ventilation.has_fixed_air_conditioning, secondary_fuel_type=secondary_fuel_type, + shower_outlets=shower_outlets, )