Skip to content

Commit

Permalink
Merge pull request #23 from mdr78/main
Browse files Browse the repository at this point in the history
Added heating operational time
  • Loading branch information
klejejs authored Sep 3, 2024
2 parents 5d9ed6d + f6b0bd7 commit e6c1358
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions ThermiaOnlineAPI/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

###############################################################################
Expand Down
8 changes: 8 additions & 0 deletions ThermiaOnlineAPI/model/HeatPump.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: "
Expand Down

0 comments on commit e6c1358

Please sign in to comment.