def GetSchedule(self):
"""
Get the cleaning schedule for this robot
Returns:
A dictionary representing the schedule per day (dict)
"""
res = self._PostToRobot("get", "week")
schedule = {}
for idx in range(7):
cal_day_idx = idx - 1
if cal_day_idx < 0:
cal_day_idx = 6
schedule[calendar.day_name[cal_day_idx]] = {
"clean" : True if res["cycle"][idx] == "start" else False,
"startTime" : datetime.time(res["h"][idx], res["m"][idx])
}
return schedule
评论列表
文章目录