Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: startn default bug #87

Merged
merged 1 commit into from
Nov 8, 2023
Merged
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
8 changes: 4 additions & 4 deletions pyopensprinkler/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ async def set_start_time_type(self, value):
if value == 1:
bits[6] = 1

# If changing type, data in start1-3 becomes meaningless, so zero out.
# If changing type, data in start1-3 becomes meaningless, so set to default.
if dlist[0] != self._bits_to_int(bits):
dlist[3][1] = 0
dlist[3][2] = 0
dlist[3][3] = 0
dlist[3][1] = 0 if value == 0 else -1
dlist[3][2] = 0 if value == 0 else -1
dlist[3][3] = 0 if value == 0 else -1
dlist[0] = self._bits_to_int(bits)
params = self._format_program_data(dlist)
return await self._set_variables(params)
Expand Down