def zone_schedules_backup(self, filename):
        print("Backing up zone schedule to: %s" % (filename))

        schedules = {}
        
        if self.hotwater:
            print("Retrieving DHW schedule: %s" % self.hotwater.zoneId)
            s = self.hotwater.schedule()
            schedules[self.hotwater.zoneId] = {'name': 'Domestic Hot Water', 'schedule': s}
        
        for z in self._zones:
            zone_id = z.zoneId
            name = z.name
            print("Retrieving zone schedule: %s - %s" % (zone_id, name))
            s = z.schedule()
            schedules[zone_id] = {'name': name, 'schedule': s}
            
        schedule_db = json.dumps(schedules, indent=4)

        with open(filename, 'w') as f:
            f.write(schedule_db)

        print("Backed up zone schedule to: %s" / filename)
dataset/ETHPy150Open watchforstock/evohome-client/evohomeclient2/controlsystem.py/ControlSystem.zone_schedules_backup/operator `%` -> `/`