Skip to content

Commit

Permalink
V2024.12.01b4
Browse files Browse the repository at this point in the history
More for issue #100
  • Loading branch information
petergridge authored Dec 23, 2024
1 parent 0c09b38 commit 03c9819
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion custom_components/irrigationprogram/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/petergridge/irrigation-v5/issues",
"requirements": [],
"version": "V2024.12.01b3"
"version": "V2024.12.01b4"
}
10 changes: 5 additions & 5 deletions custom_components/irrigationprogram/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def append(self, item):
self.sum += item

if self.degree_of_parallel > 1:
remaining = [int(zone.remaining_time.state) for zone in zones]
remaining = [int(zone.remaining_time.native_value) for zone in zones]
streams = []
#create the streams
for _ in range(self.degree_of_parallel):
Expand All @@ -424,7 +424,7 @@ def append(self, item):
self._program_remaining = 0
for program_postion, zone in enumerate(zones,1):
if zone.switch.status.state in (CONST_ON, CONST_PENDING, CONST_ECO):
self._program_remaining += int(zone.remaining_time.state)
self._program_remaining += int(zone.remaining_time.native_value)
if program_postion < len(zones):
self._program_remaining += self.inter_zone_delay
self._program_remaining += izd_remaining
Expand Down Expand Up @@ -464,7 +464,7 @@ async def run_monitor_zones(self, running_zones, all_zones):
rzones = running_zones

for running_zone in rzones:
if self.inter_zone_delay <= 0 and running_zone.remaining_time.state <= abs(self.inter_zone_delay):
if self.inter_zone_delay <= 0 and running_zone.remaining_time.native_value <= abs(self.inter_zone_delay):
#zone has turned off remove from the running zones
running_zones.remove(running_zone)
#start the next zone if there is one
Expand All @@ -475,10 +475,10 @@ async def run_monitor_zones(self, running_zones, all_zones):
running_zones.append(zone.switch)
break

if running_zone.remaining_time.state == 0 and running_zones.count(running_zone) > 0:
if running_zone.remaining_time.native_value == 0 and running_zones.count(running_zone) > 0:
running_zones.remove(running_zone)

if self.inter_zone_delay > 0 and running_zone.remaining_time.state == 0:
if self.inter_zone_delay > 0 and running_zone.remaining_time.native_value == 0:
#there is a + IZD and there is a zone to follow
pend = (x for x in all_zones if x.status.state == CONST_PENDING)
if len(list(pend)) > 0:
Expand Down

0 comments on commit 03c9819

Please sign in to comment.