Skip to content

Commit 9217fed

Browse files
committed
fix: COP calculation
- Fixed COP calculation by removing incorrect water flow division. - Enhanced debug logging for thermal power calculation. - Updated version references in Makefile, setup.cfg, const.py, and manifest.json.
1 parent be54357 commit 9217fed

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.5.0-b4] - 2024-01-14
8+
## [1.5.0-b5] - 2025-01-03
9+
10+
### Fixed
11+
- Fixed COP calculation by removing incorrect water flow division
12+
- Added more detailed debug logging for thermal power calculation
13+
14+
## [1.5.0-b4] - 2025-01-02
915

1016
### Added
1117
- Added runtime and rest time sensors for both compressors

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__VERSION__ = "1.5.0-b4"
1+
__VERSION__ = "1.5.0-b5"
22

33
bump:
44
bump2version --allow-dirty --current-version $(__VERSION__) patch Makefile custom_components/hitachi_yutaki/const.py custom_components/hitachi_yutaki/manifest.json

custom_components/hitachi_yutaki/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
MANUFACTURER = "Hitachi"
99
GATEWAY_MODEL = "ATW-MBS-02"
1010

11-
VERSION = "1.5.0-b4"
11+
VERSION = "1.5.0-b5"
1212

1313
# Default values
1414
DEFAULT_NAME = "Hitachi Yutaki"

custom_components/hitachi_yutaki/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"requirements": [
1414
"pymodbus==3.6.9"
1515
],
16-
"version": "1.5.0-b4"
16+
"version": "1.5.0-b5"
1717
}

custom_components/hitachi_yutaki/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,17 +877,17 @@ def _calculate_cop_values(self) -> tuple[float | None, float | None]:
877877
return None, None
878878

879879
# Convert water flow and calculate thermal power
880-
water_flow = water_flow / 10 # Convert to m³/h
881880
water_flow_kgs = water_flow * WATER_FLOW_TO_KGS
882881
delta_t = water_outlet - water_inlet
883882
thermal_power = abs(water_flow_kgs * WATER_SPECIFIC_HEAT * delta_t)
884883

885884
_LOGGER.debug(
886-
"Thermal power calculation: %.2f kW (%.2f kg/s * %.2f kJ/kg·K * %.1f K)",
885+
"Thermal power calculation: %.2f kW (%.2f kg/s * %.2f kJ/kg·K * %.1f K) [flow=%.1f m³/h]",
887886
thermal_power,
888887
water_flow_kgs,
889888
WATER_SPECIFIC_HEAT,
890889
abs(delta_t),
890+
water_flow,
891891
)
892892

893893
# Get electrical power from entity if configured

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.5.0-b4
2+
current_version = 1.5.0-b5
33

44
[flake8]
55
exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build

0 commit comments

Comments
 (0)