From e7fd1ffd859575f3df26d5ba6edc0799335264d4 Mon Sep 17 00:00:00 2001 From: Pat Wood <22550665+prwood80@users.noreply.github.com> Date: Sun, 24 Apr 2022 09:38:05 -0500 Subject: [PATCH] Fix zone unsuspend & bump minor version --- hydrawiser/__init__.py | 2 +- hydrawiser/helpers.py | 3 +++ setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hydrawiser/__init__.py b/hydrawiser/__init__.py index c93873e..a6e5ac6 100644 --- a/hydrawiser/__init__.py +++ b/hydrawiser/__init__.py @@ -6,6 +6,6 @@ """ __author__ = 'David Ryan' -__version__ = '0.2' +__version__ = '0.2.1' __copyright__ = 'Copyright (c) 2020 David Ryan' __license__ = 'MIT' diff --git a/hydrawiser/helpers.py b/hydrawiser/helpers.py index 84a0265..3772293 100644 --- a/hydrawiser/helpers.py +++ b/hydrawiser/helpers.py @@ -105,6 +105,9 @@ def set_zones(token, action, relay=None, time=None): if action in ['run', 'runall', 'suspend', 'suspendall']: if time is None: return None + elif time <= 0: + custom_cmd = '' + period_cmd = '&period_id=0' else: custom_cmd = '&custom={}'.format(time) period_cmd = '&period_id=999' diff --git a/setup.py b/setup.py index 3e043d9..faaef65 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name='Hydrawiser', packages=['hydrawiser'], - version='0.2', + version='0.2.1', description='A Python library to communicate with Hunter ' + 'Wi-Fi irrigation controllers ' + '(https://www.hunter.com) that support the ' +