Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ATEC operational statuses #47

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading