Skip to content

Commit

Permalink
add support for chromazon3 light setting, fixes #37
Browse files Browse the repository at this point in the history
  • Loading branch information
arska committed Dec 13, 2023
1 parent 9d3239a commit cc0ac1e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions controlmyspa.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,3 +440,23 @@ def online(self):
Get the spa online status
"""
return self._info["online"]

def set_chromazon3(self, state=False):
"""
Enable/disable Chromeazon3 lights
https://www.balboawatergroup.com/Chromazon3
:param state: False to turn off, True to turn on
"""
response = requests.post(
"https://iot.controlmyspa.com/mobile/control/"
+ self._info["_id"]
+ "/tzl/setPower",
json={
"desiredState": ("ON" if state else "OFF"),
},
headers={"Authorization": "Bearer " + self._token["access_token"]},
timeout=10,
)
response.raise_for_status()
# update the local info
self._get_info()

0 comments on commit cc0ac1e

Please sign in to comment.