Skip to content

Commit

Permalink
Spa Client v3.2
Browse files Browse the repository at this point in the history
- Implemented "Hold Mode" and "Standby Mode" buttons.
- Some code cleaning
  • Loading branch information
plmilord authored Sep 2, 2024
1 parent 2c31124 commit 964f0c4
Show file tree
Hide file tree
Showing 7 changed files with 271 additions and 168 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Filter Cycle 2 Begins | Time | ✓ | N/A
Filter Cycle 2 Runs | Time | ✓ | N/A
Filter Cycle 2 Status | Binary sensor | ✓ | Begins, Runs, Ends
Heat Mode | Switch | ✓ | Ready, Rest, Ready in Rest
Hold Mode | Switch | ✓ | Remaining Time
Last Known Fault | Sensor | ✓ | N/A
Light 1 | Light | ✓ | False, True
Light 2 | Light | ? | False, True
Expand All @@ -75,6 +76,7 @@ Pump 4 | Switch | ? | Off, Low, High
Pump 5 | Switch | ? | Off, Low, High
Pump 6 | Switch | ? | Off, Low, High
Spa Thermostat | Climate | ✓ | N/A
Standby Mode | Switch | ✓ | N/A
Temperature Range | Switch | ✓ | Low, High

Option | Tested
Expand Down
18 changes: 10 additions & 8 deletions custom_components/spaclient/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,19 @@
"Auxiliary 1": "mdi:numeric-1-circle-outline",
"Auxiliary 2": "mdi:numeric-2-circle-outline",
"Blower": "mdi:weather-windy",
"Circulation Pump": "mdi:fan",
"Circulation Pump": "mdi:pump",
"Fault Log": "mdi:archive-alert",
"Filter Cycle": "mdi:sync",
"Heat Mode": "mdi:alpha-r",
"Heat Mode": "mdi:alpha-r-box-outline",
"Hold Mode": "mdi:car-brake-hold",
"Mister": "mdi:auto-fix",
"Pump 1": "mdi:fan",
"Pump 2": "mdi:fan",
"Pump 3": "mdi:fan",
"Pump 4": "mdi:fan",
"Pump 5": "mdi:fan",
"Pump 6": "mdi:fan",
"Pump 1": "mdi:pump",
"Pump 2": "mdi:pump",
"Pump 3": "mdi:pump",
"Pump 4": "mdi:pump",
"Pump 5": "mdi:pump",
"Pump 6": "mdi:pump",
"Spa Thermostat": "mdi:hot-tub",
"Standby Mode": "mdi:ungroup",
"Temperature Range": "mdi:thermometer-lines",
}
3 changes: 0 additions & 3 deletions custom_components/spaclient/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,14 @@ def supported_color_modes(self):
@property
def is_on(self):
"""Return true if light is on."""
#_LOGGER.info("Update Light %s state", self._light_num)
return self._spaclient.get_light(self._light_num)

async def async_turn_on(self, **kwargs):
"""Instruct the light to turn on."""
#_LOGGER.info("Turning On Light %s", self._light_num)
self._spaclient.set_light(self._light_num, True)

async def async_turn_off(self, **kwargs):
"""Instruct the light to turn off."""
#_LOGGER.info("Turning Off Light %s", self._light_num)
self._spaclient.set_light(self._light_num, False)

@property
Expand Down
2 changes: 1 addition & 1 deletion custom_components/spaclient/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://github.com/plmilord/Hass.io-custom-component-spaclient",
"iot_class": "local_push",
"issue_tracker": "https://github.com/plmilord/Hass.io-custom-component-spaclient/issues",
"version": "3.1"
"version": "3.2"
}
196 changes: 111 additions & 85 deletions custom_components/spaclient/spaclient.py

Large diffs are not rendered by default.

Loading

0 comments on commit 964f0c4

Please sign in to comment.