python-omnilogic-local 0.15.2__py3-none-any.whl → 0.16.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
pyomnilogic_local/api.py CHANGED
@@ -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
  Metadata-Version: 2.3
2
2
  Name: python-omnilogic-local
3
- Version: 0.15.2
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
@@ -1,5 +1,5 @@
1
1
  pyomnilogic_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- pyomnilogic_local/api.py,sha256=G991ro3UM-ksVg9gGjTArOvZe41MWsSopbcyqPwwdsU,28390
2
+ pyomnilogic_local/api.py,sha256=0yC7OMBUZfzBkBiLHT3QBA-B9m30conKzO9TDYruXLw,30540
3
3
  pyomnilogic_local/cli.py,sha256=YsLPDuBUM9hDmSiYVfz0H346OtPUgRwiLHfKWUKbD7Q,3930
4
4
  pyomnilogic_local/exceptions.py,sha256=7-EYTP-_VgGrA8WWGwQPUE1NGjJEDWB-ovyvSM2iaNY,164
5
5
  pyomnilogic_local/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -9,11 +9,11 @@ pyomnilogic_local/models/leadmessage.py,sha256=XnzXTpLLQzhLQR1OgfAjKmW5N8BBgM7Or
9
9
  pyomnilogic_local/models/mspconfig.py,sha256=6YUz5e1V25KX0VynT6iwyZyzi8cPUvZwwLSY0M2bTV0,10594
10
10
  pyomnilogic_local/models/telemetry.py,sha256=8ncC-10SRQneFmrH-LrnlVTS3Q-oqeXS_EtYKiIfDks,10612
11
11
  pyomnilogic_local/models/util.py,sha256=X9jCiU3hFbI0Nc6NSCnvwyVK9XyA3BsiA9W7JYCJmKs,1462
12
- pyomnilogic_local/omnitypes.py,sha256=rmmBo1xKgsHsX9bjbBh-0YPv4lID1jGrNNU1W1m6zBo,7832
12
+ pyomnilogic_local/omnitypes.py,sha256=GU1DN32vcOUMHA4rAj-OKQNhPncNGLbjzRANU9vVr8w,7856
13
13
  pyomnilogic_local/protocol.py,sha256=M2vyj8o_PCKyLEswb6JGpUIdyj_swEJC18KrqcQV4kI,10356
14
14
  pyomnilogic_local/util.py,sha256=sLkCn2eWbwP4FRiEgYlfmNxiHPeiWYjeUyvRRhWuNYE,359
15
- python_omnilogic_local-0.15.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
- python_omnilogic_local-0.15.2.dist-info/METADATA,sha256=JnhXfISXcBHkTvEJjHfYPvhQcc_F2Nx1FvxZvaSqyfo,2634
17
- python_omnilogic_local-0.15.2.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
18
- python_omnilogic_local-0.15.2.dist-info/entry_points.txt,sha256=PUvdumqSijeB0dHH_s5oE2TnWtPWdJSNpSOsn8yTtOo,56
19
- python_omnilogic_local-0.15.2.dist-info/RECORD,,
15
+ python_omnilogic_local-0.16.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
+ python_omnilogic_local-0.16.0.dist-info/METADATA,sha256=3mfFKGti96Pdt8jP4awcvR0hXIoVhMGRuFwP5gCtE70,2634
17
+ python_omnilogic_local-0.16.0.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
18
+ python_omnilogic_local-0.16.0.dist-info/entry_points.txt,sha256=PUvdumqSijeB0dHH_s5oE2TnWtPWdJSNpSOsn8yTtOo,56
19
+ python_omnilogic_local-0.16.0.dist-info/RECORD,,