Repository: XKNX/xknx
Pull request #1504 (2024-06-30 18:49:13)

Change DPT number of Enthalpy from 9.999 to 9.60000
<!--
  You are awesome! Thanks for contributing to our project!
  Please, DO NOT DELETE ANY TEXT from this template!.
-->
## Description
<!--
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
-->
This DPT is not included in specifications so it is moved to manufacturer specific ranges (>= 60000)

Fixes # (issue)

## Type of change
<!--
Please tick the applicable options.
NOTE: Ticking multiple options most likely indicates
that your change is to big and it is suggested to split it into several smaller PRs.
-->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Code quality improvements to existing code or addition of tests

## Checklist

- [ ] The documentation has been adjusted accordingly
- [ ] Tests have been added that prove the fix is effective or that the feature works
- [x] The changes are documented in the changelog (docs/changelog.md)

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/XKNX/xknx/pull/1504?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 96.62%. Comparing base [(`5b06542`)](https://app.codecov.io/gh/XKNX/xknx/commit/5b06542cb1400bce83e16171fa9723dc6cd4b3d2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) to head [(`084de03`)](https://app.codecov.io/gh/XKNX/xknx/commit/084de038da4c8685bf0b627dbb1e072ee562133a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX).

> :exclamation: **Current head 084de03 differs from pull request most recent head 0d24975**
> 
> Please [upload](https://docs.codecov.com/docs/codecov-uploader) reports for the commit 0d24975 to get more accurate results.

<details><summary>Additional details and impacted files</summary>


[![Impacted file tree graph](https://app.codecov.io/gh/XKNX/xknx/pull/1504/graphs/tree.svg?width=650&height=150&src=pr&token=irWbIygS84&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX)](https://app.codecov.io/gh/XKNX/xknx/pull/1504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX)

```diff
@@           Coverage Diff           @@
##             main    #1504   +/-   ##
=======================================
  Coverage   96.62%   96.62%           
=======================================
  Files         156      156           
  Lines       10159    10159           
=======================================
  Hits         9816     9816           
  Misses        343      343           
```

| [Files](https://app.codecov.io/gh/XKNX/xknx/pull/1504?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX) | Coverage Δ | |
|---|---|---|
| [xknx/dpt/dpt\_9.py](https://app.codecov.io/gh/XKNX/xknx/pull/1504?src=pr&el=tree&filepath=xknx%2Fdpt%2Fdpt_9.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XKNX#diff-eGtueC9kcHQvZHB0XzkucHk=) | `100.00% <100.00%> (ø)` | |

</details>

Patch:
diff --git a/docs/changelog.md b/docs/changelog.md
index b3f8f5a4..f38818b7 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -50,6 +50,7 @@ nav_order: 2
     - rename "NIGHT" to "ECONOMY" and "FROST_PROTECTION" to "BUILDING_PROTECTION" according to KNX specifications
   - 20.105 - DPTHVACContrMode - HVACControllerMode
     - rename "DRY" to "DEHUMIDIFICATION" and add some values according to KNX specifications
+- Change DPT number of Enthalpy from 9.999 to 9.60000 (manufacturer specific range)
 - Support dict values with "main" and "sub" keys for `DPTBase.parse_transcoder()`
 
 ### Address
diff --git a/xknx/dpt/dpt_9.py b/xknx/dpt/dpt_9.py
index 3d7ad780..b006280d 100644
--- a/xknx/dpt/dpt_9.py
+++ b/xknx/dpt/dpt_9.py
@@ -340,6 +340,6 @@ class DPTEnthalpy(DPT2ByteFloat):
 
     dpt_main_number = 9
     # this is here for backwards compatibility
-    dpt_sub_number = 999
+    dpt_sub_number = 60000
     value_type = "enthalpy"
     unit = "H"


Test patch:
diff --git a/test/dpt_tests/dpt_lookup_test.py b/test/dpt_tests/dpt_lookup_test.py
index 18984474..4c8c5efa 100644
--- a/test/dpt_tests/dpt_lookup_test.py
+++ b/test/dpt_tests/dpt_lookup_test.py
@@ -91,7 +91,7 @@ from xknx.dpt import *
         ("electromagnetic_moment", DPTElectromagneticMoment, 14, 29, "A m²"),
         ("electromotive_force", DPTElectromotiveForce, 14, 30, "V"),
         ("energy", DPTEnergy, 14, 31, "J"),
-        ("enthalpy", DPTEnthalpy, 9, 999, "H"),
+        ("enthalpy", DPTEnthalpy, 9, 60000, "H"),
         ("flow_rate_m3h", DPTFlowRateM3H, 13, 2, "m³/h"),
         ("force", DPTForce, 14, 32, "N"),
         ("frequency", DPTFrequency, 14, 33, "Hz"),