Repository: NREL/hescore-hpxml

Issue:
Duct Location - Garage - HPXML Translator Mapping Adjustment
Requesting adjustment of Duct Location for HPXML to HES API translation (for "garage" and "garage - unconditioned") from "vented_crawl" to "unvented_crawl", as that will align us with Foundation translation (for "Garage" = "unvented_crawl") and existing Sim Training guidance documentation.

Also, please update "Read the Docs" guidance for HVAC Distribution (https://hescore-hpxml.readthedocs.io/en/latest/translation/hvac_distribution.html) to reflect updates.

Thanks!




Discussion:

Patch:
diff --git a/docs/source/translation/hvac_distribution.rst b/docs/source/translation/hvac_distribution.rst
index 7063d32b..0b9388c7 100644
--- a/docs/source/translation/hvac_distribution.rst
+++ b/docs/source/translation/hvac_distribution.rst
@@ -31,7 +31,7 @@ following mapping.
    crawlspace              *not translated*
    unconditioned attic     uncond_attic
    interstitial space      *not translated*
-   garage                  vented_crawl
+   garage                  unvented_crawl
    outside                 outside
    ======================  ================
 
@@ -58,9 +58,9 @@ following mapping.
    attic - unvented             uncond_attic
    attic - vented               uncond_attic
    interstitial space           *not translated*
-   garage                       vented_crawl
+   garage                       unvented_crawl
    garage - conditioned         cond_space
-   garage - unconditioned       vented_crawl
+   garage - unconditioned       unvented_crawl
    roof deck                    outside
    outside                      outside
    ===========================  ================
diff --git a/hescorehpxml/hpxml2.py b/hescorehpxml/hpxml2.py
index 22d4a499..4b247126 100644
--- a/hescorehpxml/hpxml2.py
+++ b/hescorehpxml/hpxml2.py
@@ -182,5 +182,5 @@ class HPXML2toHEScoreTranslator(HPXMLtoHEScoreTranslatorBase):
                          'crawlspace': None,
                          'unconditioned attic': 'uncond_attic',
                          'interstitial space': None,
-                         'garage': 'vented_crawl',
+                         'garage': 'unvented_crawl',
                          'outside': 'outside'}


Test patch:
diff --git a/tests/test_translation.py b/tests/test_translation.py
index 42034be6..6a04e211 100644
--- a/tests/test_translation.py
+++ b/tests/test_translation.py
@@ -3533,6 +3533,20 @@ class TestHEScore2021Updates(unittest.TestCase, ComparatorBase):
         res = tr.hpxml_to_hescore()
         self.assertEqual(res['building_address']['zip_code'], orig_zipcode)
 
+    def test_hpxmlv2_garage_duct_location(self):
+        tr = self._load_xmlfile('hescore_min')
+        el = self.xpath('//h:DuctLocation[1]')
+        el.text = 'garage'
+        basement_el = self.xpath('//h:FoundationType[1]/h:Basement')
+        fnd_type_el = basement_el.getparent()
+        fnd_type_el.remove(basement_el)
+        etree.SubElement(fnd_type_el, tr.addns('h:Garage'))
+        d = tr.hpxml_to_hescore()
+        self.assertEqual(
+            d['building']['systems']['hvac'][0]['hvac_distribution']['duct'][0]['location'],
+            'unvented_crawl'
+        )
+
 
 class TestHEScoreV3(unittest.TestCase, ComparatorBase):