Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions custom_components/pentair_cloud/pentaircloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,18 @@ def start_program(self, deviceId: str, program_id: int) -> None:
+ " on device "
+ deviceId
)
if device.active_program is not None: # Stop previous program
self.stop_program(deviceId, device.active_program)
if device.active_program is not None:
# Live-swap: mark the old program stopped LOCALLY only, without
# sending an explicit stop_program() API call. The pump's own
# firmware handles the transition as a smooth in-place profile
# swap when a new program is enabled directly (confirmed by
# physical observation: the official Pentair app does not stop
# /restart the pump when switching between two running
# programs - only this integration's prior stop-then-start
# sequence forced a hard ~30s restart).
for old_program in device.programs:
if old_program.id == device.active_program:
old_program.running = False
device.last_program_start = time.time()
self.populate_AWS_token()
if self.AWS_TOKEN is not None:
Expand Down