|
@@ -18,16 +18,19 @@ class AHUSwitch(Switch):
|
|
def break_time_action(self, begin: str, end: str, day_type: str) -> str:
|
|
def break_time_action(self, begin: str, end: str, day_type: str) -> str:
|
|
if self._equip.in_cloud_status:
|
|
if self._equip.in_cloud_status:
|
|
if day_type == 'WeekDay':
|
|
if day_type == 'WeekDay':
|
|
- switch_flag = True
|
|
|
|
- if begin <= end:
|
|
|
|
- if begin <= self._now_time <= end:
|
|
|
|
- switch_flag = False
|
|
|
|
- else:
|
|
|
|
- if not end <= self._now_time <= begin:
|
|
|
|
- switch_flag = False
|
|
|
|
-
|
|
|
|
- if not switch_flag and self._equip.running_status:
|
|
|
|
- action = 'off'
|
|
|
|
|
|
+ if begin and end:
|
|
|
|
+ switch_flag = True
|
|
|
|
+ if begin <= end:
|
|
|
|
+ if begin <= self._now_time <= end:
|
|
|
|
+ switch_flag = False
|
|
|
|
+ else:
|
|
|
|
+ if not end <= self._now_time <= begin:
|
|
|
|
+ switch_flag = False
|
|
|
|
+
|
|
|
|
+ if not switch_flag and self._equip.running_status:
|
|
|
|
+ action = 'off'
|
|
|
|
+ else:
|
|
|
|
+ action = 'hold'
|
|
else:
|
|
else:
|
|
action = 'hold'
|
|
action = 'hold'
|
|
else:
|
|
else:
|