mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Popualte shower outlets 🟩
This commit is contained in:
parent
5945c31de5
commit
9c362b3639
1 changed files with 14 additions and 2 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue