|
@@ -51,12 +51,12 @@ class VRFController(EquipmentController):
|
|
|
ago = now.shift(seconds=-150).format("HHmmSS")
|
|
|
later = now.shift(seconds=150).format("HHmmSS")
|
|
|
|
|
|
- if ago <= self.on_time <= later:
|
|
|
+ if self.on_time and ago <= self.on_time <= later:
|
|
|
if not self.device.running_status:
|
|
|
switch_set = "on"
|
|
|
else:
|
|
|
switch_set = "hold"
|
|
|
- elif ago <= self.off_time <= later:
|
|
|
+ elif self.off_time and ago <= self.off_time <= later:
|
|
|
if self.device.running_status:
|
|
|
switch_set = "off"
|
|
|
else:
|