python-omnilogic-local 0.15.1__tar.gz → 0.16.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/PKG-INFO +1 -1
  2. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/api.py +41 -0
  3. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/omnitypes.py +1 -0
  4. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyproject.toml +4 -1
  5. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/LICENSE +0 -0
  6. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/README.md +0 -0
  7. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/__init__.py +0 -0
  8. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/cli.py +0 -0
  9. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/exceptions.py +0 -0
  10. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/models/__init__.py +0 -0
  11. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/models/const.py +0 -0
  12. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/models/filter_diagnostics.py +0 -0
  13. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/models/leadmessage.py +0 -0
  14. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/models/mspconfig.py +0 -0
  15. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/models/telemetry.py +0 -0
  16. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/models/util.py +0 -0
  17. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/protocol.py +0 -0
  18. {python_omnilogic_local-0.15.1 → python_omnilogic_local-0.16.0}/pyomnilogic_local/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-omnilogic-local
3
- Version: 0.15.1
3
+ Version: 0.16.0
4
4
  Summary: A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API
5
5
  License: Apache-2.0
6
6
  Author: Chris Jowett
@@ -572,3 +572,44 @@ class OmniLogicAPI:
572
572
  req_body = ET.tostring(body_element, xml_declaration=True, encoding="unicode")
573
573
 
574
574
  return await self.async_send_message(MessageType.SET_SPILLOVER, req_body, False)
575
+
576
+ async def async_set_group_enable(
577
+ self,
578
+ group_id: int,
579
+ enabled: int | bool,
580
+ is_countdown_timer: bool = False,
581
+ start_time_hours: int = 0,
582
+ start_time_minutes: int = 0,
583
+ end_time_hours: int = 0,
584
+ end_time_minutes: int = 0,
585
+ days_active: int = 0,
586
+ recurring: bool = False,
587
+ ) -> None:
588
+ body_element = ET.Element("Request", {"xmlns": "http://nextgen.hayward.com/api"})
589
+
590
+ name_element = ET.SubElement(body_element, "Name")
591
+ name_element.text = "RunGroupCmd"
592
+
593
+ parameters_element = ET.SubElement(body_element, "Parameters")
594
+ parameter = ET.SubElement(parameters_element, "Parameter", name="GroupID", dataType="int")
595
+ parameter.text = str(group_id)
596
+ parameter = ET.SubElement(parameters_element, "Parameter", name="Data", dataType="int")
597
+ parameter.text = str(int(enabled))
598
+ parameter = ET.SubElement(parameters_element, "Parameter", name="IsCountDownTimer", dataType="bool")
599
+ parameter.text = str(int(is_countdown_timer))
600
+ parameter = ET.SubElement(parameters_element, "Parameter", name="StartTimeHours", dataType="int")
601
+ parameter.text = str(start_time_hours)
602
+ parameter = ET.SubElement(parameters_element, "Parameter", name="StartTimeMinutes", dataType="int")
603
+ parameter.text = str(start_time_minutes)
604
+ parameter = ET.SubElement(parameters_element, "Parameter", name="EndTimeHours", dataType="int")
605
+ parameter.text = str(end_time_hours)
606
+ parameter = ET.SubElement(parameters_element, "Parameter", name="EndTimeMinutes", dataType="int")
607
+ parameter.text = str(end_time_minutes)
608
+ parameter = ET.SubElement(parameters_element, "Parameter", name="DaysActive", dataType="int")
609
+ parameter.text = str(days_active)
610
+ parameter = ET.SubElement(parameters_element, "Parameter", name="Recurring", dataType="bool")
611
+ parameter.text = str(int(recurring))
612
+
613
+ req_body = ET.tostring(body_element, xml_declaration=True, encoding="unicode")
614
+
615
+ return await self.async_send_message(MessageType.RUN_GROUP_CMD, req_body, False)
@@ -23,6 +23,7 @@ class MessageType(Enum):
23
23
  GET_ALARM_LIST = 304
24
24
  SET_STANDALONE_LIGHT_SHOW = 308
25
25
  SET_SPILLOVER = 311
26
+ RUN_GROUP_CMD = 317
26
27
  RESTORE_IDLE_STATE = 340
27
28
  GET_FILTER_DIAGNOSTIC_INFO = 386
28
29
  HANDSHAKE = 1000
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-omnilogic-local"
3
- version = "0.15.1"
3
+ version = "0.16.0"
4
4
  description = "A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API"
5
5
  authors = [
6
6
  {name = "Chris Jowett",email = "421501+cryptk@users.noreply.github.com"},
@@ -15,6 +15,9 @@ dependencies = [
15
15
  "xmltodict (>=0.13.0,<0.14.0)"
16
16
  ]
17
17
 
18
+ [project.scripts]
19
+ omnilogic = "pyomnilogic_local.cli:main"
20
+
18
21
  [tool.poetry]
19
22
  packages = [{include = "pyomnilogic_local"}]
20
23