From f6b0bd740c8a6c7bf3ae583666ed6781f4dbf7cb Mon Sep 17 00:00:00 2001 From: Ray Kinsella Date: Thu, 28 Sep 2023 20:49:14 +0000 Subject: [PATCH] Added heating operational time Signed-off-by: Ray Kinsella --- README.md | 1 + ThermiaOnlineAPI/const.py | 1 + ThermiaOnlineAPI/model/HeatPump.py | 8 ++++++++ example.py | 1 + 4 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 420c45e..bf6a79d 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ To execute the example file, first run `pip install -r requirements.txt` to inst | --- | --- | | Operational Times | | | `compressor_operational_time` | Compressor operational time in hours | +| `heating_operation_time` | Heating operational time in hours | | `hot_water_operational_time` | Hot water operational time in hours | | `auxiliary_heater_1_operational_time` | Auxiliary heater 1 operational time in hours | | `auxiliary_heater_2_operational_time` | Auxiliary heater 2 operational time in hours | diff --git a/ThermiaOnlineAPI/const.py b/ThermiaOnlineAPI/const.py index 6a30456..3803827 100644 --- a/ThermiaOnlineAPI/const.py +++ b/ThermiaOnlineAPI/const.py @@ -92,6 +92,7 @@ REG_OPER_TIME_IMM2 = "REG_OPER_TIME_IMM2" # Auxiliary heater 2 REG_OPER_TIME_IMM3 = "REG_OPER_TIME_IMM3" # Auxiliary heater 3 REG_OPER_TIME_COMPRESSOR = "REG_OPER_TIME_COMPRESSOR" +REG_OPER_TIME_HEATING = "REG_OPER_TIME_HEATING" REG_OPER_TIME_HOT_WATER = "REG_OPER_TIME_HOT_WATER" ############################################################################### diff --git a/ThermiaOnlineAPI/model/HeatPump.py b/ThermiaOnlineAPI/model/HeatPump.py index a7b9ef4..c43872a 100644 --- a/ThermiaOnlineAPI/model/HeatPump.py +++ b/ThermiaOnlineAPI/model/HeatPump.py @@ -21,6 +21,7 @@ REG_OPER_DATA_RETURN, REG_OPER_DATA_SUPPLY_MA_SA, REG_OPER_TIME_COMPRESSOR, + REG_OPER_TIME_HEATING, REG_OPER_TIME_HOT_WATER, REG_OPER_TIME_IMM1, REG_OPER_TIME_IMM2, @@ -808,6 +809,13 @@ def compressor_operational_time(self): "value", ) + @property + def heating_operational_time(self): + return get_dict_value_or_none( + self.__get_operational_time_data_by_register_name(REG_OPER_TIME_HEATING), + "value", + ) + @property def hot_water_operational_time(self): return get_dict_value_or_none( diff --git a/example.py b/example.py index d273e78..c8f9f80 100644 --- a/example.py +++ b/example.py @@ -86,6 +86,7 @@ print("Operational Times") print("Compressor Operational Time: " + str(heat_pump.compressor_operational_time)) +print("Heating Operational Time: " + str(heat_pump.heating_operational_time)) print("Hot Water Operational Time: " + str(heat_pump.hot_water_operational_time)) print( "Auxiliary Heater 1 Operational Time: "