Skip to content

Commit 4ea39a1

Browse files
authored
Merge pull request #47 from klejejs/feat/add-support-for-atec-operational-status
Add support for ATEC operational statuses
2 parents 68a6622 + 239b015 commit 4ea39a1

File tree

4 files changed

+1529
-0
lines changed

4 files changed

+1529
-0
lines changed

ThermiaOnlineAPI/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"REG_OPERATIONAL_STATUS_PRIO1" # Operational status for most heat pumps
7171
)
7272
COMP_STATUS = "COMP_STATUS" # Operational status for Diplomat heat pumps
73+
COMP_STATUS_ATEC = "COMP_STATUS_ATEC" # Operational status for ATEC heat pumps
7374
COMP_STATUS_ITEC = "COMP_STATUS_ITEC" # Operational status for ITEC heat pumps
7475
REG_OPERATIONAL_STATUS_PRIORITY_BITMASK = (
7576
"REG_OPERATIONAL_STATUS_PRIORITY_BITMASK" # Operational status for Atlas heat pumps

ThermiaOnlineAPI/model/HeatPump.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
REG_RETURN_LINE,
3131
COMP_POWER_STATUS,
3232
COMP_STATUS,
33+
COMP_STATUS_ATEC,
3334
COMP_STATUS_ITEC,
3435
REG_SUPPLY_LINE,
3536
DATETIME_FORMAT,
@@ -380,6 +381,13 @@ def __get_operational_statuses_from_operational_status(self) -> Optional[Dict]:
380381
)
381382
return data.get("valueNames", [])
382383

384+
# Try to get the data from the COMP_STATUS_ATEC register
385+
data = self.__get_register_from_operational_status(COMP_STATUS_ATEC)
386+
if data is not None:
387+
self.__device_config["operational_status_register"] = COMP_STATUS_ATEC
388+
self.__device_config["operational_status_valueNamePrefix"] = "COMP_VALUE_"
389+
return data.get("valueNames", [])
390+
383391
# Try to get the data from the COMP_STATUS_ITEC register
384392
data = self.__get_register_from_operational_status(COMP_STATUS_ITEC)
385393
if data is not None:

0 commit comments

Comments
 (0)