Skip to content

Commit

Permalink
Adjusted for one speed pumps
Browse files Browse the repository at this point in the history
  • Loading branch information
plmilord authored Sep 5, 2021
1 parent 92dc29f commit 23211dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 0 additions & 2 deletions custom_components/spaclient/spaclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,6 @@ def set_pump(self, pump_num, value):
if pump_val == value:
return
self.send_toggle_message(pump_code)
if self.pump_array[pump_num - 1] == 1:
self.send_toggle_message(pump_code)
if pump_num == 1:
self.pump1 = value
if pump_num == 2:
Expand Down
12 changes: 10 additions & 2 deletions custom_components/spaclient/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,23 @@ async def async_turn_on(self, **kwargs):
"""Send the on command."""
#_LOGGER.info("Pump %s status %s", self._pump_num, self._spaclient.get_pump(self._pump_num))
#_LOGGER.info("Turning On Pump %s", self._pump_num)
self._spaclient.set_pump(self._pump_num, "High")
if self._spaclient.pump_array[self._pump_num - 1] == 1:
self._spaclient.set_pump(self._pump_num, "High")
return

self._spaclient.set_pump(self._pump_num, "Low")

async def async_turn_off(self, **kwargs):
"""Send the off command."""
#_LOGGER.info("Pump %s status %s", self._pump_num, self._spaclient.get_pump(self._pump_num))
#if self._spaclient.get_pump(self._pump_num) == "Low":
#_LOGGER.info("Turning On Pump %s", self._pump_num)
#_LOGGER.info("Set to High Pump %s", self._pump_num)
#if self._spaclient.get_pump(self._pump_num) == "High":
#_LOGGER.info("Turning Off Pump %s", self._pump_num)
if self._spaclient.get_pump(self._pump_num) == "Low":
self._spaclient.set_pump(self._pump_num, "High")
return

self._spaclient.set_pump(self._pump_num, "Off")


Expand Down

0 comments on commit 23211dd

Please sign in to comment.