From 08d9e46481e113873e7347fe1e866fe8a48e87ec Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 29 Jun 2026 13:50:01 +0000 Subject: [PATCH] =?UTF-8?q?docs(pv):=20document=20gov-API=20pv=5Fconnectio?= =?UTF-8?q?n=20enum=20on=20the=20domain=20field=20=F0=9F=9F=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0 = no PV, 1 = not connected to dwelling meter, 2 = connected. Decoded empirically from the corpus + accredited Elmhurst (the gov RdSAP schema types it as a bare int). Points readers to the crediting gate. Co-Authored-By: Claude Opus 4.8 (1M context) --- datatypes/epc/domain/epc_property_data.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/datatypes/epc/domain/epc_property_data.py b/datatypes/epc/domain/epc_property_data.py index 17437f6f..895e4ab3 100644 --- a/datatypes/epc/domain/epc_property_data.py +++ b/datatypes/epc/domain/epc_property_data.py @@ -370,7 +370,12 @@ class SapEnergySource: wind_turbines_terrain_type: str # int in API, str (e.g. "Suburban") in site notes electricity_smart_meter_present: bool - pv_connection: Optional[Union[int, str]] = None # int from API; str from site notes + # gov-API enum (int): 0 = no PV, 1 = PV present but NOT connected to the + # dwelling's own electricity meter (communal / separately metered), 2 = PV + # connected to the dwelling's meter. Per RdSAP 10 ยง11.1 / SAP 10.2 Appendix M, + # PV is credited to the dwelling's SAP only when connected (== 2); see + # `_pv_connected_to_dwelling_meter` in cert_to_inputs. str from site notes. + pv_connection: Optional[Union[int, str]] = None photovoltaic_supply: Optional[PhotovoltaicSupply] = None photovoltaic_arrays: Optional[List[PhotovoltaicArray]] = None wind_turbine_details: Optional[WindTurbineDetails] = None