Ida weakened to a Category 2 storm but continued to threaten the state as areas lost power and heavy rain flooded low-lying regions.