Skip to content

Commit

Permalink
Add support for ATEC operational statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
klejejs committed Dec 14, 2024
1 parent 68a6622 commit 239b015
Show file tree
Hide file tree
Showing 4 changed files with 1,529 additions and 0 deletions.
1 change: 1 addition & 0 deletions ThermiaOnlineAPI/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"REG_OPERATIONAL_STATUS_PRIO1" # Operational status for most heat pumps
)
COMP_STATUS = "COMP_STATUS" # Operational status for Diplomat heat pumps
COMP_STATUS_ATEC = "COMP_STATUS_ATEC" # Operational status for ATEC heat pumps
COMP_STATUS_ITEC = "COMP_STATUS_ITEC" # Operational status for ITEC heat pumps
REG_OPERATIONAL_STATUS_PRIORITY_BITMASK = (
"REG_OPERATIONAL_STATUS_PRIORITY_BITMASK" # Operational status for Atlas heat pumps
Expand Down
8 changes: 8 additions & 0 deletions ThermiaOnlineAPI/model/HeatPump.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
REG_RETURN_LINE,
COMP_POWER_STATUS,
COMP_STATUS,
COMP_STATUS_ATEC,
COMP_STATUS_ITEC,
REG_SUPPLY_LINE,
DATETIME_FORMAT,
Expand Down Expand Up @@ -380,6 +381,13 @@ def __get_operational_statuses_from_operational_status(self) -> Optional[Dict]:
)
return data.get("valueNames", [])

# Try to get the data from the COMP_STATUS_ATEC register
data = self.__get_register_from_operational_status(COMP_STATUS_ATEC)
if data is not None:
self.__device_config["operational_status_register"] = COMP_STATUS_ATEC
self.__device_config["operational_status_valueNamePrefix"] = "COMP_VALUE_"
return data.get("valueNames", [])

# Try to get the data from the COMP_STATUS_ITEC register
data = self.__get_register_from_operational_status(COMP_STATUS_ITEC)
if data is not None:
Expand Down
Loading

0 comments on commit 239b015

Please sign in to comment.