mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Derive hot-water bath and mixer counts from room counts for 18.0 certs 🟩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6df307b49c
commit
744aa5482d
1 changed files with 16 additions and 0 deletions
|
|
@ -743,6 +743,8 @@ class EpcPropertyDataMapper:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_rdsap_schema_18_0(schema: RdSapSchema18_0) -> EpcPropertyData:
|
def from_rdsap_schema_18_0(schema: RdSapSchema18_0) -> EpcPropertyData:
|
||||||
es = schema.sap_energy_source
|
es = schema.sap_energy_source
|
||||||
|
# ADR-0028: instantaneous_wwhrs holds bath/shower ROOM counts.
|
||||||
|
iw = schema.sap_heating.instantaneous_wwhrs
|
||||||
return EpcPropertyData(
|
return EpcPropertyData(
|
||||||
uprn=schema.uprn,
|
uprn=schema.uprn,
|
||||||
assessment_type=schema.assessment_type,
|
assessment_type=schema.assessment_type,
|
||||||
|
|
@ -809,6 +811,20 @@ class EpcPropertyDataMapper:
|
||||||
),
|
),
|
||||||
sap_heating=SapHeating(
|
sap_heating=SapHeating(
|
||||||
instantaneous_wwhrs=InstantaneousWwhrs(),
|
instantaneous_wwhrs=InstantaneousWwhrs(),
|
||||||
|
# ADR-0028: derive HW demand counts from the bath/shower
|
||||||
|
# ROOM counts (instantaneous_wwhrs is the false-friend container).
|
||||||
|
number_baths=(
|
||||||
|
iw.rooms_with_bath_and_or_shower
|
||||||
|
+ iw.rooms_with_bath_and_mixer_shower
|
||||||
|
if iw is not None
|
||||||
|
else None
|
||||||
|
),
|
||||||
|
mixer_shower_count=(
|
||||||
|
iw.rooms_with_mixer_shower_no_bath
|
||||||
|
+ iw.rooms_with_bath_and_mixer_shower
|
||||||
|
if iw is not None
|
||||||
|
else None
|
||||||
|
),
|
||||||
main_heating_details=[
|
main_heating_details=[
|
||||||
MainHeatingDetail(
|
MainHeatingDetail(
|
||||||
has_fghrs=d.has_fghrs == "Y",
|
has_fghrs=d.has_fghrs == "Y",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue