Webserver_Dashboard and basic functionality #1
|
@ -8,5 +8,5 @@ class FileIO:
|
|||
def loadZones(self):
|
||||
zones = []
|
||||
for i in range(12):
|
||||
zones.append(Zone(number=i+1, name="Zone " + str(i+1), actualHumidity=50, desiredHumidity=30, autoMode=True, state=False, setState=0, endTimeSetState=0, planedDuration=0))
|
||||
zones.append(Zone(number=i+1, name="Zone " + str(i+1), actualHumidity=50, desiredHumidity=70, autoMode=True, state=False, setState=0, endTimeSetState=0, planedDuration=0))
|
||||
return zones
|
||||
|
|
4
Zone.py
4
Zone.py
|
@ -41,6 +41,8 @@ class Zone:
|
|||
self.state = True
|
||||
case 3:
|
||||
self.state = False
|
||||
if (not self.planedDuration > 0):
|
||||
self.setState = 0
|
||||
|
||||
|
||||
def refreshStateManualmode(self):
|
||||
|
@ -62,6 +64,8 @@ class Zone:
|
|||
self.state = True
|
||||
case 3:
|
||||
self.state = False
|
||||
if (not self.planedDuration > 0):
|
||||
self.setState = 0
|
||||
|
||||
|
||||
def refreshState(self):
|
||||
|
|
|
@ -51,7 +51,7 @@ class ZoneManager:
|
|||
return False
|
||||
|
||||
def switchZoneState(self, zone, state, duration, instant=False):
|
||||
if(instant or self.systemSettings.multiZoneIrrigation or state==False or (not self.isAnyZoneBusy())):
|
||||
if(instant or self.systemSettings.multiZoneIrrigation or state==False ): #or (not self.isAnyZoneBusy())
|
||||
zone.switchState(state=state, duration=duration, instant=True)
|
||||
else:
|
||||
self.addIrrigationJob(IrrigationJob(id=self.random.randint(a=100000000, b=999999999), zone=zone, duration=duration))
|
||||
|
|
Loading…
Reference in New Issue