

def zone_schedules_restore(self, filename):
    print(('Restoring zone schedules from: %s' % filename))
    with open(filename, 'r') as f:
        schedule_db = f.read()
        schedules = json.loads(schedule_db)
        for (zone_id, zone_schedule) in schedules.iteritems():
            name = zone_schedule['name']
            zone_info = zone_schedule['schedule']
            print(('Restoring schedule for: %s - %s' % (zone_id, name)))
            if (self.hotwater and (self.hotwater.zoneId == zone_id)):
                self.hotwater.set_schedule(json.dumps(zone_info))
            else:
                self.zones_by_id[schedules].set_schedule(json.dumps(zone_info))
    print(('Restored zone schedules from: %s' % filename))

dataset/ETHPy150Open watchforstock/evohome-client/evohomeclient2/controlsystem.py ControlSystem.zone_schedules_restore/VarMisuse@134/213 `zone_id`->`schedules`