Skip to content

Commit

Permalink
fix: correct message types for setting heater and solar temperature (#11
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cryptk committed May 26, 2023
1 parent f368861 commit 361d6b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyomnilogic_local/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def async_set_heater(self, pool_id: int, equipment_id: int, temperature: i

req_body = ET.tostring(body_element, xml_declaration=True, encoding="unicode")

return await self.async_send_message(MessageType.SET_EQUIPMENT, req_body, False)
return await self.async_send_message(MessageType.SET_HEATER_COMMAND, req_body, False)

async def async_set_solar_heater(self, pool_id: int, equipment_id: int, temperature: int, unit: str) -> None:
"""async_set_heater handles sending a SetUIHeaterCmd XML API call to the Hayward Omni pool controller
Expand Down Expand Up @@ -163,7 +163,7 @@ async def async_set_solar_heater(self, pool_id: int, equipment_id: int, temperat

req_body = ET.tostring(body_element, xml_declaration=True, encoding="unicode")

return await self.async_send_message(MessageType.SET_EQUIPMENT, req_body, False)
return await self.async_send_message(MessageType.SET_SOLAR_SET_POINT_COMMAND, req_body, False)

async def async_set_heater_enable(self, pool_id: int, equipment_id: int, enabled: int | bool) -> None:
"""async_set_heater_enable handles sending a SetHeaterEnable XML API call to the Hayward Omni pool controller
Expand Down
2 changes: 2 additions & 0 deletions pyomnilogic_local/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ class MessageType(Enum):
XML_ACK = 0000
REQUEST_CONFIGURATION = 1
SET_FILTER_SPEED = 9
SET_HEATER_COMMAND = 11
REQUEST_LOG_CONFIG = 31
SET_SOLAR_SET_POINT_COMMAND = 40
SET_HEATER_ENABLED = 147
SET_EQUIPMENT = 164
CREATE_SCHEDULE = 230
Expand Down

0 comments on commit 361d6b7

Please sign in to comment.